forked from 1b-agent/fieldcraft-upstream
model: heat in a fluid domain
A fluid domain may carry thermal settings: the initial temperature, gravity and the fluid's expansion coefficient for buoyancy, and a thermal condition (adiabatic, held temperature, heat flux) on each box face and on named obstacle faces, adiabatic unless told otherwise. The material then needs an isotropic conductivity and a specific heat. Boundaries are set one at a time like the flow ones. Part of #157.
This commit is contained in:
1 parent
7d419b73f4
commit
ea284caf80
4 files changed
+284
-11
No files matched your search
@@ -510,11 +510,7 @@ impl Model {
|
||||
|
||||
pub fn replace_material(&mut self, name: &str, material: Material) -> Result<()> {
|
||||
material.validate().map_err(|e| context("material", name, e))?;
|
||||
if material.fluid.is_none()
|
||||
&& let Some(d) = self.fluid_domains_of_material(name).next()
|
||||
{
|
||||
return Err(Error::Invalid(format!("material `{name}`: fluid domain `{d}` needs its fluid behaviour")));
|
||||
}
|
||||
self.check_material_fits_fluid_domains(name, &material)?;
|
||||
replace_existing(&mut self.materials, "material", name, material)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user