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

Entropy calculation in OpenFoam

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

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 8, 2013, 15:32
Default
  #21
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
OpenFOAM hasn't implemented all possible combinations of thermodynamic options.
You have to first check the list of valid combinations, as implied here: http://www.openfoam.org/version2.2.0....php#x10-40000 - section "Dictionary-based Thermodynamics Selection".

In other words: did you first run the solver with those options in the dictionary file, to confirm if it works?
__________________
wyldckat is offline   Reply With Quote

Old   September 8, 2013, 16:09
Default
  #22
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
Hi Bruno
yes that case is finished 10 days before and I'm engaging with making more than 150 plots,and its the thermodynamic dictionary:
Code:
thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;//janaf;//
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}
mixture
{
    specie
    {
        nMoles          1;
        molWeight       28.96;
    }
    thermodynamics
    {
     /*Tlow 200;
     Thigh 6000;
     Tcommon 1000;
     highCpCoeffs (3.129672277499967 1.211766752750042e-3 -4.04761109000018e-7 6.409571300000324e-11 -3.780447620000211e-15 -.996955811e3 5.257756413);
     lowCpCoeffs  (3.593868050000014 -8.419292810001117e-4 2.08457592775033e-6 -5.938441825004294e-10 -2.456771699998039e-13 -1.0512181e3 3.140021718);*/
        Cp              1100;
        Hf              2.544e+06;
    }
    transport
    {
       /*As 1.4584e-6;
       Ts 110.4;*/
        mu              0;//1.84e-05
        Pr              0.75;
    }
}
maybe I have converted it by some mistakes.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 8, 2013, 16:37
Default
  #23
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Ehsan,

Unfortunately OpenFOAM doesn't have the calculation of entropy implemented for the "hConstThermo":
Quote:
From file "$FOAM_SRC/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H":
Code:
template<class equationOfState>
inline Foam::scalar Foam::hConstThermo<equationOfState>::s
(
    const scalar p, const scalar T
) const
{
    notImplemented
    (
        "scalar hConstThermo<equationOfState>::"
        "s(const scalar p, const scalar T) const"
    );
    return T;
}
If you run this command:
Code:
ls -l $FOAM_SRC/thermophysicalModels/specie/thermo
You should see some of the possible options for the "thermo" option.

After looking at the source codes, only the following options have an implemented entropy calculation:
Code:
janaf
hPolynomial
Best regards,
Bruno
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 8, 2013, 17:18
Default
  #24
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
many thanks Bruno for consideration and investigation,
when I wanted to run the "inviscid case" because its inviscid,so viscosity had to be 0(constant) then
Code:
transport       const;
had to be set and I wanted to set
Code:
thermo         janaf;// hConst;//
but it didn't accept it according to possible combinations:
Code:
Valid psiThermo types are:

type            mixture                    transport   thermo  equationOfState  specie  energy

hePsiThermo     homogeneousMixture         const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     homogeneousMixture         sutherland  hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     homogeneousMixture         sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     inhomogeneousMixture       const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     inhomogeneousMixture       sutherland  hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     inhomogeneousMixture       sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     multiComponentMixture      const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     multiComponentMixture      sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     pureMixture                const       eConst  perfectGas       specie  sensibleInternalEnergy
hePsiThermo     pureMixture                const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     pureMixture                const       hConst  perfectGas       specie  sensibleInternalEnergy
hePsiThermo     pureMixture                sutherland  eConst  perfectGas       specie  sensibleInternalEnergy
hePsiThermo     pureMixture                sutherland  hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     pureMixture                sutherland  hConst  perfectGas       specie  sensibleInternalEnergy
hePsiThermo     pureMixture                sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     pureMixture                sutherland  janaf   perfectGas       specie  sensibleInternalEnergy
hePsiThermo     reactingMixture            const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     reactingMixture            sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     singleStepReactingMixture  sutherland  janaf   perfectGas       specie  sensibleEnthalpy
hePsiThermo     veryInhomogeneousMixture   const       hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     veryInhomogeneousMixture   sutherland  hConst  perfectGas       specie  sensibleEnthalpy
hePsiThermo     veryInhomogeneousMixture   sutherland  janaf   perfectGas       specie  sensibleEnthalpy
heheuPsiThermo  egrMixture                 const       hConst  perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  egrMixture                 sutherland  janaf   perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  egrMixture                 sutherland  janaf   perfectGas       specie  absoluteInternalEnergy
heheuPsiThermo  homogeneousMixture         const       hConst  perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  homogeneousMixture         sutherland  janaf   perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  homogeneousMixture         sutherland  janaf   perfectGas       specie  absoluteInternalEnergy
heheuPsiThermo  inhomogeneousMixture       const       hConst  perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  inhomogeneousMixture       sutherland  janaf   perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  inhomogeneousMixture       sutherland  janaf   perfectGas       specie  absoluteInternalEnergy
heheuPsiThermo  veryInhomogeneousMixture   const       hConst  perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  veryInhomogeneousMixture   sutherland  janaf   perfectGas       specie  absoluteEnthalpy
heheuPsiThermo  veryInhomogeneousMixture   sutherland  janaf   perfectGas       specie  absoluteInternalEnergy
it verifies what you mentioned,it doesn't calculate entropy because its not Janaf and it can't be set for constant transport parameters in ordinary thermodynamical combinations.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x wyldckat OpenFOAM Bugs 18 October 21, 2010 05:51
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
Velocity spots in openFoam results Valle OpenFOAM Running, Solving & CFD 4 August 19, 2009 05:53
Entropy Cormac Main CFD Forum 4 August 13, 2000 23:26


All times are GMT -4. The time now is 20:24.