arnica.phys package
Physical utilities
The phys package provides physical utilities for computational fluid dynamics (CFD) problems. It includes modules for thermodynamic properties, solid materials, and wall thermal equilibrium.
thermodyn_properties: computes thermal constants and values related to turbulence.
solid_material: represents a solid material with methods for calculating thermal conductivity and resistance.
yk_from_phi: calculates mass fractions of species from a given Phi coefficient.
wall_thermal_equilibrium: computes the thermal equilibrium for a 2-layer wall (Metal/ceramic) by iteratively estimating temperatures until convergence.
Submodules
arnica.phys.solid_material module
This module defines a class SolidMaterial that represents a solid material for thermal computations.
This class has two main methods: lambda_th and thermal_resistance : The lambda_th method returns the thermal conductivity (lambda) of the material at a given temperature. It clips the input temperature to ensure it falls within the valid range defined by _lambda_range. The method then uses the polynomial representation of the material’s thermal conductivity to calculate the value at the clipped temperature.
The thermal_resistance method calculates the thermal resistance of a layer with a given width and estimated temperature (t_est). It returns the thermal resistance in units of square meters per Kelvin per Watt (m2.K/W).
- class arnica.phys.solid_material.SolidMaterial(lambda_poly, lambda_range)
Bases:
objectdefine properties of a solid material object
- lambda_th(temperature)
return the lambda of ceramics material [W/mK]
- thermal_resistance(width, t_est)
return the thermal resistance [m2.K/W] width : width of the layer t_est : estimated temperature of the layer
arnica.phys.thermodyn_properties module
This module provides functions for computing thermodynamic properties, specifically thermal constants and values related to turbulence. The thermal_constants function generates a dictionary containing various thermal constants used in calculations. The _estimate_log_region function evaluates the value of u_tau in the log region using a recursive loop. The _estimate_t_tau function computes the value of T_tau.
- arnica.phys.thermodyn_properties.fluid_cp(temp, clipping=False)
compute cp of fluid
- Args:
temp (TYPE): Description clipping (bool, optional): Description
- Returns:
TYPE: Description
- arnica.phys.thermodyn_properties.h_kader(t_wall, rho_wall, y_wall, u_2, t_2, temp_adiab)
compute h at the wall as in kader names taken equalt to loglaw_cwm.f90 AVBP
- Args:
t_wall (TYPE): Description rho_wall (TYPE): Description y_wall (TYPE): Description u_2 (TYPE): Description t_2 (TYPE): Description temp_adiab (TYPE): Description
- Returns:
TYPE: Description
- arnica.phys.thermodyn_properties.lambda_cp_visco_fluid(temperature)
compute Fluid properties lambda , cp, visco
- Args:
temperature (TYPE): Description
- Returns:
TYPE: Description
- arnica.phys.thermodyn_properties.thermal_constants()
Generate a dictionnary of thermal constants
- Returns:
TYPE: Description
- arnica.phys.thermodyn_properties.viscosity_sutherland(temp)
compute visocity as in sutherland
- Args:
temp (TYPE): Description
- Returns:
TYPE: Description
arnica.phys.wall_thermal_equilibrium module
module to compute wall equilibrium
- arnica.phys.wall_thermal_equilibrium.compute_equilibrium(hot_t_ad, cold_t_ad, hot_h, cold_h, metal, ceram, ep_metal, ep_ceram)
compute the wall equilibrium
- - - - - - - > HOT SIDE hot_h, hot_t_ad ^ phi _|___________________ t_ceram_hot | Layer 2 _|___________________ t_eq | Layer 1 _|___________________ t_metal_hot | COLD SIDE cold_h, cold_t_ad - - - - >
arnica.phys.yk_from_phi module
This script calculate mass_fraction of species from a Phi
- arnica.phys.yk_from_phi.phi_from_far(far, c_x, h_y)
Return phi coefficient with the fuel air ratior coeff + fuel composition.
- Parameters:
far (float) – the air-fuel ratio:
c_x (float) – stoechio coeff of Carbone
h_y (float) – stoechio coeff of hydrogene
- arnica.phys.yk_from_phi.yk_from_phi(phi, c_x, h_y)
Return the mass fraction of elements from a fuel aspect ratio and stoechio element coeff.
- Parameters:
phi (float) – the air-fuel aspect ratio
c_x (float) – stoechio coeff of Carbone
h_y (float) – stoechio coeff of hydrogene