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

Psat

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 15, 2012, 10:16
Default Psat
  #1
New Member
 
Nabil MEAH
Join Date: Apr 2012
Posts: 8
Rep Power: 14
bluemind is on a distinguished road
Hello,

I'm currently trying to implement the saturation pressure into the solver twoLiquidMixingFoam, so far what I have written is :

{

forAll(psat,celli){
if (ELSATl[celli] > 200.)
{
psat[celli]=cfit*exp(c1 + c2/(Tl[celli] ) +c3*log(Tl[celli]/one ) +c4*pow(Tl[celli],c5));
}
else
{
psat[celli]=0.*pfit;
}


}

}

But when I compile i get the following error message :

error: cannot convert ‘Foam::dimensioned<double>’ to ‘double’ in assignment

I've chosen the unit of the constant c1..c5 and one, such that they give a dimensionless term inside the exponential and the log function. But cfit has a dimension of pressure. Somehow when I withdraw the 'celli' term from psat I don't have any problem, but since I need to apply the temperature condition for all control volume, I feel like I have to keep (celli) this term.

Does anybody know how to solve the problem ?
bluemind is offline   Reply With Quote

 


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
Multiphase flow and Phase change due to heat transferevaporation haghajani OpenFOAM Running, Solving & CFD 88 February 11, 2020 08:00


All times are GMT -4. The time now is 08:04.