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

WLF from OF7

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2020, 08:11
Default WLF from OF7
  #1
New Member
 
Andrea
Join Date: Dec 2017
Posts: 10
Rep Power: 8
Pisolino85 is on a distinguished road
Dear all,
i'm trying to use the new WLF feature of OF7 with Cross Power Law to model a polymer CROSS-WLF behavior. According from the code and the commit it can be performed however i'm stuck with an error and there is no tutorial that can help me.

I'm a low-level user (i.e. never compiled a personal solver).


I started from a compressible interFOAM sloshingtank2d.


The cross power law for water seems ok in transportProperties
Code:
phases (water air);

water
{
//    transportModel  Newtonian;
//    nu              1e-06;
//    rho             998.2;

      transportModel powerLaw;
      powerLawCoeffs
      {
        nuMax    [ 0 2 -1 0 0 0 0 ] 1e-03;
        nuMin    [ 0 2 -1 0 0 0 0 ] 1e-05;
        k        [ 0 2 -1 0 0 0 0 ] 1e-05;
        n        [ 0 0  0 0 0 0 0 ] 1;
      }

}

air
{
    transportModel  Newtonian;
    nu              1.48e-05;
    rho             1;
}

sigma           0;
While i'm having troubles for WLF model in thermophysicalProperties:
Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       WLF; //const 
    thermo          eConst;
    equationOfState perfectGas;  //perfectFluid
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight   18.0;
    }
    equationOfState
    {
        R           3000;
        rho0        1027;
    }
    thermodynamics
    {
     //   Cv          4195;  //perfect fluid
        Cp          4195;  //perfect gas
        Hf          0;
    }
    transport
    {
   //     mu          3.645e-4;
        mu0         4.76e1;
        Tr          373.15;
        C1          25.7;
        C2          61.06;
        Pr          2.289;
    }
}
the error given is not so useful for me to solve the problem:

Code:
Selecting thermodynamics package 
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       WLF;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}



--> FOAM FATAL ERROR: 
Unknown rhoThermo type 
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       WLF;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}


Valid rhoThermo types are:

heRhoThermo  homogeneousMixture         const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        

heRhoThermo  homogeneousMixture         const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  homogeneousMixture         sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  homogeneousMixture         sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  inhomogeneousMixture       const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  inhomogeneousMixture       const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  inhomogeneousMixture       sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  inhomogeneousMixture       sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      const       eConst       adiabaticPerfectFluid     specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      const       eConst       incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      const       eConst       perfectFluid              specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      const       eConst       perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      const       eConst       rhoConst                  specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      const       hConst       adiabaticPerfectFluid     specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      const       hConst       perfectFluid              specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      const       hConst       rhoConst                  specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      polynomial  hPolynomial  icoPolynomial             specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      polynomial  hPolynomial  icoPolynomial             specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      sutherland  janaf        incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  multiComponentMixture      sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  multiComponentMixture      sutherland  janaf        perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                WLF         eConst       rhoConst                  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       eConst       Boussinesq                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       eConst       adiabaticPerfectFluid     specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       eConst       perfectFluid              specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       eConst       rhoConst                  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       Boussinesq                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       Boussinesq                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       adiabaticPerfectFluid     specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       adiabaticPerfectFluid     specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       perfectFluid              specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       perfectFluid              specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                const       hConst       rhoConst                  specie  sensibleEnthalpy        
heRhoThermo  pureMixture                const       hConst       rhoConst                  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                polynomial  hPolynomial  PengRobinsonGas           specie  sensibleEnthalpy        
heRhoThermo  pureMixture                polynomial  hPolynomial  icoPolynomial             specie  sensibleEnthalpy        
heRhoThermo  pureMixture                polynomial  hPolynomial  icoPolynomial             specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                polynomial  janaf        PengRobinsonGas           specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  hConst       Boussinesq                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  hConst       Boussinesq                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                sutherland  hConst       PengRobinsonGas           specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  hConst       incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                sutherland  hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  hConst       perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                sutherland  janaf        Boussinesq                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  janaf        Boussinesq                specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  janaf        incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  pureMixture                sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  pureMixture                sutherland  janaf        perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       eConst       adiabaticPerfectFluid     specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       eConst       incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       eConst       perfectFluid              specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       eConst       perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       eConst       rhoConst                  specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            const       hConst       adiabaticPerfectFluid     specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            const       hConst       perfectFluid              specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            const       hConst       rhoConst                  specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            polynomial  hPolynomial  icoPolynomial             specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            polynomial  hPolynomial  icoPolynomial             specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            sutherland  janaf        incompressiblePerfectGas  specie  sensibleInternalEnergy  
heRhoThermo  reactingMixture            sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  reactingMixture            sutherland  janaf        perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  singleStepReactingMixture  sutherland  janaf        perfectGas                specie  sensibleEnthalpy        
heRhoThermo  singleStepReactingMixture  sutherland  janaf        perfectGas                specie  sensibleInternalEnergy  
heRhoThermo  veryInhomogeneousMixture   const       hConst       incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  veryInhomogeneousMixture   const       hConst       perfectGas                specie  sensibleEnthalpy        
heRhoThermo  veryInhomogeneousMixture   sutherland  janaf        incompressiblePerfectGas  specie  sensibleEnthalpy        
heRhoThermo  veryInhomogeneousMixture   sutherland  janaf        perfectGas                specie  sensibleEnthalpy        


    From function static typename Table::iterator Foam::basicThermo::lookupThermo(const Foam::dictionary&, Table*, int, const char**, const Foam::word&) [with Thermo = Foam::rhoThermo; Table = Foam::HashTable<Foam::autoPtr<Foam::rhoThermo> (*)(const Foam::fvMesh&, const Foam::word&), Foam::word, Foam::string::hash>; typename Table::iterator = Foam::HashTable<Foam::autoPtr<Foam::rhoThermo> (*)(const Foam::fvMesh&, const Foam::word&), Foam::word, Foam::string::hash>::iterator]
    in file lnInclude/basicThermoTemplates.C at line 46.

FOAM exiting

Does anyone have any suggestion or tutorial on how to use properly WLF model ? If not i hope this will be the first WLF tutorial for OF
Pisolino85 is offline   Reply With Quote

Old   April 24, 2020, 12:37
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
From the information that popped up, you can see that WLF looks to only be compatible with (ie implemented for) eConst/rhoConst -- it is on this line :

Code:
heRhoThermo  pureMixture                WLF         eConst       rhoConst                  specie  sensibleInternalEnergy
.

Caelan
clapointe is offline   Reply With Quote

Old   April 26, 2020, 07:34
Default
  #3
New Member
 
Andrea
Join Date: Dec 2017
Posts: 10
Rep Power: 8
Pisolino85 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
From the information that popped up, you can see that WLF looks to only be compatible with (ie implemented for) eConst/rhoConst -- it is on this line :

Code:
heRhoThermo  pureMixture                WLF         eConst       rhoConst                  specie  sensibleInternalEnergy
.

Caelan
really thankyou clapointe.



I followed your advice and it works:


thermoType
{
type heRhoThermo;
mixture pureMixture;
transport WLF; //const in tutorial
thermo eConst;
equationOfState rhoConst; //perfectFluid in tutorial
specie specie;
energy sensibleInternalEnergy;
}




However this is a bad notice for me since to model correctly a melt polymer in injection molding we need also a compressible formulation (Tait equation) that this CROSS-WLF model doesn't support.


By the way thank you for the answer and sorry for my silly question ( i didn't noticed the WLF suggestion from OF in my first attempts).


Andrea
Pisolino85 is offline   Reply With Quote

Reply


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
[OpenFOAM.com] Build error for OF7 with WM_LABEL_SIZE=64 skh1 OpenFOAM Installation 4 March 23, 2020 09:50
[OpenFOAM.org] OpenFOAM installation problem (of7 not working) tenichols19 OpenFOAM Installation 3 September 20, 2019 03:24
[OpenFOAM.org] Problem updating OpenFOAM-dev on Scientific Linux 7 sita OpenFOAM Installation 9 August 30, 2019 04:35
[OpenFOAM.org] OF7 compiling error on RHEL 6.5 ssdoria OpenFOAM Installation 5 August 3, 2019 15:36
WLF shift function - Ansys samuel_ ANSYS 0 March 13, 2018 11:29


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