Skip to content

Reply To: Linear Temperature distribution on walls


Dear Sahil,

regarding your first question, please specify the function as an analytical functor (e.g. AnalyticalLinear3D) and pass it to the boundary condition (depending on what arguments it requires). You can find this procedure in basically any example at some point.

For detailed conversion rules please have a look at the file src/core/thermalUnitConverter.h:
– l.75: The conversion factor for temperature is computed via: (charPhysHighTemperature – charPhysLowTemperature). You set these two values in physical units at the beginning of your simulation. In your case these could be 278K and 318K.
– l.144 onwards: The converter uses the conversion factor for temperature to compute a lattice value of a given physical temperature in this way: (physTemperature – charPhysLowTemperature) / _conversionTemperature + 0.5; and eventually a typecast. Hence, according to this rule, the converter converts charPhysHighTemperature to 1 and charPhysLowTemperature to 0.
– In case you assign your appearing wall temperatures to these two values (in physical units!), respectively, the answer to your second question is yes.