pub struct SteadyConductionProblem { /* private fields */ }Expand description
A steady conduction problem: a mesh, the heat source of each zone and the condition on each patch.
Implementations§
Source§impl SteadyConductionProblem
impl SteadyConductionProblem
Sourcepub fn new(
mesh: ConductionMesh,
zone_heat_source: Vec<VolumetricPowerDensity>,
patches: Vec<PatchCondition>,
) -> Result<Self, SteadyConductionError>
pub fn new( mesh: ConductionMesh, zone_heat_source: Vec<VolumetricPowerDensity>, patches: Vec<PatchCondition>, ) -> Result<Self, SteadyConductionError>
Set up a problem.
zone_heat_source has one entry per zone (mesh.n_zones);
patches one entry per mesh patch, in patch order.
§Errors
SteadyConductionError::InvalidInput for wrong lengths, a negative or
non-finite source, a non-positive h, a film-area fraction of the
wrong length or outside [0, 1], or a heated body with no patch that
removes heat (no steady state exists).
Sourcepub fn mesh(&self) -> &ConductionMesh
pub fn mesh(&self) -> &ConductionMesh
The mesh the problem is posed on.
Sourcepub fn solve<K>(
&self,
conductivity: K,
settings: &SteadyConductionSettings,
) -> Result<SteadyConductionSolution, SteadyConductionError>
pub fn solve<K>( &self, conductivity: K, settings: &SteadyConductionSettings, ) -> Result<SteadyConductionSolution, SteadyConductionError>
Solve for the steady temperature.
conductivity(zone, T) gives k of a zone at temperature T; it is
re-evaluated at every cell’s temperature between passes (Picard) until
no cell moves more than settings.picard_tolerance. A constant k
converges on the second pass.
§Errors
SteadyConductionError::BadConductivity for a non-positive or
non-finite k; SteadyConductionError::LinearSolveFailed;
SteadyConductionError::PicardNotConverged.