

Hi I need to model variable flow rate with time depending on the temperature on the particular patch.
If Temp<300.15 K then flow rate is 0.058;
else Temp>300.15K then flow rate is (m*temp)+c
I recently read that expressions can be modelled directly in openfoam 1912.
Initially I tried to model flowrate I'm unable to do so. Hence I used
SERVER_SOURCE
{
type exprFixedValue;
value $internalField;
valueExpr "(tSink<=300.15)?vector(0,value1/area1,0):vector(0,((0.00531*tSink)-0.08485)/area1,0)";
variables
(
"tSink{SERVER_SINK} = weightAverage(T)"
"value1{SERVER_SOURCE} = 0.05852"
"area1{SERVER_SOURCE} = area()"
);
}
But Im getting the following warning while the simulation is running
"--> FOAM Warning :
From function bool Foam::expressions::exprResult::getUniformChecked(F oam::expressions::exprResult&, Foam::label, bool, bool) const [with Type = double; Foam::label = int]
in file expressions/exprResult/exprResultI.H at line 143
Different min/max values: (0.000674827 0.00410428) Using the average 0.00146216
Can any one explain how to fix this error?
Also is it feasible to model variable flow rate instead of velocity?
OpenFOAM


In the case of expression based Boundary conditions, you can use GroovyBC which is the sub utility of swak4foam. That will help you setup boundary condition without coding.
Thanks,
Divyesh
Login to add comment