October 16, 2024, 07:31
|
Adding a temperature dependent FvOptions in ChtMultiRegionFoam for an electric oven
|
#1
|
New Member
Arunkl
Join Date: Jun 2024
Posts: 7
Rep Power: 2
|
I am new to heat transfer solvers in openfoam and working to simulate an electric oven. in this there is four coils and air region. I am using chtMultiRegionFoam for this as it has multiple regions. I have came through Fvoptions which is time dependent but i need to model Temperature dependent so that if the mean temperature increases upto 250 C it should supply heat and turn off the heat source. Again if the temperature reduces it should on the heat source. I have attached the basic Coding i have done and thankyou in advance for your most thankful help... this is for natural convection to the air
Code:
options
{
energySource
{
type scalarSemiImplicitSource;
selectionMode cellSet;
cellSet ignition;
volumeMode specific;
sources
{
h (2e7 0); // kg/m/s^3
}
// Temperature-dependent behavior
code
#{
// Get the mean temperature from the temperature field
const scalar T_mean = T.mean(); // Assuming T is the temperature field variable
// Check if T_mean exceeds 250 °C
if (T_mean >= 250 + 273.15) // Convert 250 °C to Kelvin
{
return 0; // Turn off the heat source if T_mean is 250 °C or higher
}
else
{
// Return the source value only if the temperature is below 250 °C
return h; // Return the defined source value
}
#};
}
}
if there any mistake kindly feel free to say in the thread and it would be very helpful and the version used is ise version v2212
thank you
|
|
|