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

compressibleInterFoam. Problems defining liquid properties in OF8 and 9

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By cbarring

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2022, 20:02
Default compressibleInterFoam. Problems defining liquid properties in OF8 and 9
  #1
New Member
 
cbarring
Join Date: Sep 2014
Posts: 5
Rep Power: 12
cbarring is on a distinguished road
Hello.
I am trying to model a water-like liquid as one of the phases in compressibleInterFoam. The equation of state for this liquid would be altered due to impurities. The adiabaticPerfectFluid model would do the job. I put the adiabaticPerfectFluid model code in the thermophysicalProperties.water file. Under OF7, everything works.

When I do exactly the same thing in OF8 and 9 I get:
_____________________________________________
--> FOAM FATAL ERROR:

lookup of thermophysicalProperties.water from objectRegistry region0 successful
but it is not a heRhoThermo<pureMixture<liquid,sensibleInternalEne rgy>>, it is a heRhoThermo<pureMixture<const<eConst<adiabaticPerf ectFluid<specie>>,sensibleInternalEnergy>>>

From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::species::thermo<Foam::ther mophysicalPropertiesSelector<Foam::liquidPropertie s>, Foam::sensibleInternalEnergy> > >]
in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 178.

FOAM aborting
------------------------------------------------------------------------

It is possible that my implementation adiabaticPerfectFluid is wrong. So I tried using the water properties from Dr. Holzmann's Blog (https://holzmann-cfd.com/community/b...operties-water). Putting this code in thermophysicalProperties.water worked in OF7 but not in OF8. The OF8 error message was:
_____________________________________________
--> FOAM FATAL ERROR:

lookup of thermophysicalProperties.water from objectRegistry region0 successful
but it is not a heRhoThermo<pureMixture<liquid,sensibleInternalEne rgy>>, it is a heRhoThermo<pureMixture<polynomial<hPolynomial<ico Polynomial<specie>>,sensibleEnthalpy>>>

From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::species::thermo<Foam::ther mophysicalPropertiesSelector<Foam::liquidPropertie s>, Foam::sensibleInternalEnergy> > >]
in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 178.

FOAM aborting
------------------------------------------------------------------------

I suspect that the problem is that the OF8 and 9 versions of compressibleInterFoam require that the mixture in the domain must include a liquid and a gas. This makes sense for VOF to work. However, the choices available for "liquid" are limited to the following fluids (using the Banana Method): Ar, C10H22, .... , CH4N2O, H2O, IC8H18, .... , nC3H8O.

So, to force a new equation of state onto water, I think that I need to customize the H2O file (/opt/openfoam8/src/thermophysicalModels/thermophysicalProperties/liquidProperties/H2O). I would not customize the H2O files that reside in the opt directory. I would customize a copy of this file (on in my home directory) and recompile etc. But this would be a significant effort.

Or, I could just stick with OF7.

Am I missing something here? Does anybody have any ideas on what I can do to easily get OF8 or 9 to work in this situation?

Regards

Last edited by cbarring; March 8, 2022 at 14:48. Reason: Update with new information.
cbarring is offline   Reply With Quote

Old   March 8, 2022, 15:11
Default
  #2
New Member
 
cbarring
Join Date: Sep 2014
Posts: 5
Rep Power: 12
cbarring is on a distinguished road
Hi. This is an update to this post.

After a lot of trial and error, I found that these fatal errors are result of the following code in the thermophysicalProperties file with relates to the surface tension:
sigma
{
type liquidProperties;
phase water;
}

The fatal error does not occur if I replace the above code with:
sigma 0.07;

The modified thermophysicalProperties file is then exactly the same as the corresponding file for the depthCharge3D tutorial.

So, I think that if one wants to use the liquid model in compressibleInterFoam simulations, one should use:
sigma
{
type liquidProperties;
phase water;
}

For other equations of state, one should use "sigma 0.07; // water". If the fluid is not water, a different value of sigma would be required.

Regards
mikulo likes this.
cbarring is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, fatal error, liquid properties


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



All times are GMT -4. The time now is 11:09.