CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Regarding error in new expression syntax in openfoam 1912

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2020, 12:02
Default Regarding error in new expression syntax in openfoam 1912
  #1
Member
 
ijaz fazil
Join Date: Apr 2013
Location: Singapore
Posts: 71
Rep Power: 10
er_ijaz is on a distinguished road
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?
er_ijaz is offline   Reply With Quote

Old   July 15, 2020, 12:09
Default updated information
  #2
Member
 
ijaz fazil
Join Date: Apr 2013
Location: Singapore
Posts: 71
Rep Power: 10
er_ijaz is on a distinguished road
for information I changed the expression as below
{
type exprFixedValue;
value $internalField;
valueExpr "(tSink<=300.15)?vector(0,value2/area2,0):vector(0,((0.00531*tSink)-0.08485)/area2,0)";
variables
(
"tSink{SERVER_SINK} = weightAverage(T)"
"value2 = 0.05852"
"area2 = 0.20025"
);
}
The simulation is running fine but still I'm not sure what is the cause of the warning.
er_ijaz is offline   Reply With Quote

Reply

Tags
openfoam1912, pyfoam, pyfoam tutorial error, swak4foam, swak4foam error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 04:57
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
Expression and Syntax for PDEs JD CFX 2 January 3, 2010 04:19
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 17:23


All times are GMT -4. The time now is 18:17.