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

Using a Different Thermodynamics Package with the chtMultiRegionFoam Solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2010, 16:23
Default Using a Different Thermodynamics Package with the chtMultiRegionFoam Solver
  #1
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 15
m.nichols19 is on a distinguished road
Hello and thanks in advance!

I am attempting to model liquid water flowing through a steel pipe using the chtMultiRegionFoam solver. Everything is going rather well except for one issue: the thermodynamics package I selected is not valid for the solver.

I modified the hPsiThermos.C and basicMixtures.C files, but the solver still does not recognize the thermodynamics package. I probably need to modify one or two more files, but I can't figure out which ones.

The following files are thermophysicalProperties, hPsiThermos.C, basicMixtures.C, and log.chtMultiRegionFoam, respectively:

thermophysicalProperties
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>;

mixture         liquid 1 18.0 4180 6010 8.9e-04 6.2;

// ************************************************************************* //
hPsiThermos.C
Code:
\*---------------------------------------------------------------------------*/

#include "makeBasicPsiThermo.H"

#include "icoPolynomial.H"
#include "perfectGas.H"

#include "hConstThermo.H"
#include "janafThermo.H"
#include "specieThermo.H"

#include "constTransport.H"
#include "sutherlandTransport.H"

#include "hPsiThermo.H"
#include "pureMixture.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    constTransport,
    hConstThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    sutherlandTransport,
    hConstThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    sutherlandTransport,
    janafThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    constTransport,
    hConstThermo,
    icoPolynomial
);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// ************************************************************************* //
basicMixtures.C
Code:
\*---------------------------------------------------------------------------*/

#include "error.H"

#include "basicMixture.H"
#include "makeBasicMixture.H"

#include "icoPolynomial.H"
#include "perfectGas.H"

#include "eConstThermo.H"

#include "hConstThermo.H"
#include "janafThermo.H"
#include "specieThermo.H"

#include "constTransport.H"
#include "sutherlandTransport.H"

#include "pureMixture.H"

#include "addToRunTimeSelectionTable.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */

makeBasicMixture
(
    pureMixture,
    constTransport,
    hConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    hConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    constTransport,
    eConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    eConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    janafThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    constTransport,
    hConstThermo,
    icoPolynomial
);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// ************************************************************************* //
log.chtMultiRegionFoam
Code:
Build  : 1.6-53b7f692aa41
Exec   : chtMultiRegionFoam
Date   : Jun 23 2010
Time   : 14:58:23
Host   : elderville
PID    : 14014
Case   : /home/mattn/OpenFOAM/mattn-1.6/run/thisOneWorks2
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region water for time = 0.001

Create solid mesh for region tube for time = 0.001

*** Reading fluid mesh thermophysical properties for region water

    Adding to thermoFluid

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>


Unknown basicPsiThermo type hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>

Valid basicPsiThermo types are:

8
(
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
)



    From function basicPsiThermo::New(const fvMesh&)
    in file psiThermo/basicPsiThermo/newBasicPsiThermo.C at line 64.

FOAM exiting
m.nichols19 is offline   Reply With Quote

Old   June 24, 2010, 16:54
Default
  #2
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 15
m.nichols19 is on a distinguished road
I was using the wrong executable that had not been changed. I'll update my status once I resolve this error.
m.nichols19 is offline   Reply With Quote

Old   July 8, 2010, 08:33
Default
  #3
VdG
New Member
 
Vincent de Graaf
Join Date: Jun 2010
Location: Germany
Posts: 12
Rep Power: 15
VdG is on a distinguished road
Hello Matt,

did you manage to get the solver running? I am trying to do the same thing: have an incompressible liquid in one part of the domain and a compressible gas in the other part. I tried to change the solver using the modifications you mention, but it doesn't compile:

basicMixtures.C:97: error: type/value mismatch at argument 1 in template parameter list for ‘template<class equationOfState> class Foam::hConstThermo’

Any help is appreciated.
VdG is offline   Reply With Quote

Old   October 21, 2010, 07:25
Default
  #4
Member
 
Join Date: Dec 2009
Posts: 39
Rep Power: 16
marval is on a distinguished road
Any succes Matt?

I just need water for my simulation but don't know how to change the thermohysicalProperties file.
marval is offline   Reply With Quote

Old   October 21, 2010, 17:33
Default
  #5
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 15
m.nichols19 is on a distinguished road
Hello marval,

I regretfully did not.

Here is a link to my completed project if that is of any assistance:

http://www.cfd-online.com/Forums/ope...-no-catch.html

best regards,
Matt
m.nichols19 is offline   Reply With Quote

Old   October 22, 2010, 09:05
Default
  #6
Member
 
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17
juho is on a distinguished road
In the 1.7.x version, the chtMultiRegionFoam and chtMultiRegionSimpleFoam have recently been modified to use hRhoThermo, which allows icoPolynomial equation of state and thus simulation of liquid flows.

Check Henry's commits 14.-15.10.2010:
http://github.com/OpenCFD/OpenFOAM-1.7.x/commits/master
juho is offline   Reply With Quote

Old   March 15, 2011, 07:32
Default
  #7
New Member
 
karthik
Join Date: Dec 2010
Location: munich
Posts: 16
Rep Power: 15
karthik1414 is on a distinguished road
Quote:
Originally Posted by m.nichols19 View Post
Hello and thanks in advance!

I am attempting to model liquid water flowing through a steel pipe using the chtMultiRegionFoam solver. Everything is going rather well except for one issue: the thermodynamics package I selected is not valid for the solver.

I modified the hPsiThermos.C and basicMixtures.C files, but the solver still does not recognize the thermodynamics package. I probably need to modify one or two more files, but I can't figure out which ones.

The following files are thermophysicalProperties, hPsiThermos.C, basicMixtures.C, and log.chtMultiRegionFoam, respectively:

thermophysicalProperties
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>;

mixture         liquid 1 18.0 4180 6010 8.9e-04 6.2;

// ************************************************************************* //
hPsiThermos.C
Code:
\*---------------------------------------------------------------------------*/

#include "makeBasicPsiThermo.H"

#include "icoPolynomial.H"
#include "perfectGas.H"

#include "hConstThermo.H"
#include "janafThermo.H"
#include "specieThermo.H"

#include "constTransport.H"
#include "sutherlandTransport.H"

#include "hPsiThermo.H"
#include "pureMixture.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    constTransport,
    hConstThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    sutherlandTransport,
    hConstThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    sutherlandTransport,
    janafThermo,
    perfectGas
);

makeBasicPsiThermo
(
    hPsiThermo,
    pureMixture,
    constTransport,
    hConstThermo,
    icoPolynomial
);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// ************************************************************************* //
basicMixtures.C
Code:
\*---------------------------------------------------------------------------*/

#include "error.H"

#include "basicMixture.H"
#include "makeBasicMixture.H"

#include "icoPolynomial.H"
#include "perfectGas.H"

#include "eConstThermo.H"

#include "hConstThermo.H"
#include "janafThermo.H"
#include "specieThermo.H"

#include "constTransport.H"
#include "sutherlandTransport.H"

#include "pureMixture.H"

#include "addToRunTimeSelectionTable.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */

makeBasicMixture
(
    pureMixture,
    constTransport,
    hConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    hConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    constTransport,
    eConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    eConstThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    sutherlandTransport,
    janafThermo,
    perfectGas
);

makeBasicMixture
(
    pureMixture,
    constTransport,
    hConstThermo,
    icoPolynomial
);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// ************************************************************************* //
log.chtMultiRegionFoam
Code:
Build  : 1.6-53b7f692aa41
Exec   : chtMultiRegionFoam
Date   : Jun 23 2010
Time   : 14:58:23
Host   : elderville
PID    : 14014
Case   : /home/mattn/OpenFOAM/mattn-1.6/run/thisOneWorks2
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region water for time = 0.001

Create solid mesh for region tube for time = 0.001

*** Reading fluid mesh thermophysical properties for region water

    Adding to thermoFluid

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>


Unknown basicPsiThermo type hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<icoPolynomial>>>>>

Valid basicPsiThermo types are:

8
(
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
hPsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>
)



    From function basicPsiThermo::New(const fvMesh&)
    in file psiThermo/basicPsiThermo/newBasicPsiThermo.C at line 64.

FOAM exiting
hey!!
i was solving a two phase vof problem using hRhoThermo and encountered a similar error.... did you get past the error?? i am in a pinch as i cannot understand the error message!!
please help me out!!!
thanks!
regards,
Karthik
karthik1414 is offline   Reply With Quote

Old   March 17, 2011, 16:26
Thumbs up
  #8
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by juho View Post
In the 1.7.x version, the chtMultiRegionFoam and chtMultiRegionSimpleFoam have recently been modified to use hRhoThermo, which allows icoPolynomial equation of state and thus simulation of liquid flows.

Check Henry's commits 14.-15.10.2010:
http://github.com/OpenCFD/OpenFOAM-1.7.x/commits/master
Hello all, I've downloaded the add-ons and modifications from the link posted above and compiled them for OF 1.7.1: till now I've only made a simple test case with an aluminium pipe containing water (chtMultiRegionFoam), but all seem to work perfectly...

Regards

V.
vkrastev is offline   Reply With Quote

Reply

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
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Creating a new solver from chtMultiRegionFoam David_010 OpenFOAM Programming & Development 0 April 20, 2010 11:36
chtMultiregionFoam Solver msarkar OpenFOAM 1 February 24, 2010 02:56
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 22:40.