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

rhoTabulated EOS shows "Not implemented" ERROR

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2023, 03:23
Default rhoTabulated EOS shows "Not implemented" ERROR
  #1
New Member
 
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 3
sreehahaha is on a distinguished road
Hi Foamers,

First of all, thank you for all the support I've been receiving so far. Many suggestions from the forum have been incredibly helpful for me.

To the issue: I'm simulating a compressible system using a solver modified from rhoPimpleFoam on OF9. It ran successfully when I used a "thermophysicalProperties" file like:

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          eConst;
    equationOfState rPolynomial;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture                                                                        
{                                                                              
    specie                                                                     
    {                                                                          
        molWeight       18.0;                                                  
    }                                                                          
    thermodynamics                                                             
    {                              
	Cv		4233.7894;                                            
        Sf              0;                                                     
        Hf              0;                                                     
    }                                                                          
    equationOfState                                                            
    {                                                                          
        C (0.001866 -6.186e-06 1.105e-08 5.697e-13 0);               
    }                                                                          
    transport                                                                  
    {                                                                       
	mu	5.0e-03;
	Pr	26.4;   
    }                                                                          
}
But when I change the equationOfState to rhoTabulated and give rho as a table, it gives me the following error:

Code:
Using dynamicCode for codedBase heRhoThermo_pureMixture_const_eConst_rhoTabulated_specie___sensibleInternalEnergy___ at line 17 in "/desktop/2018/software/OpenFOAM/9-foss-2021b/OpenFOAM-9/etc/codeTemplates/dynamicCode/fluidThermo"
[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Not implemented
[1] 
[1]     From function Foam::scalar Foam::rhoTabulated<Specie>::E(Foam::scalar, Foam::scalar) const [with Specie = Foam::specie; Foam::scalar = double]
[1]     in file /desktop/2018/software/OpenFOAM/9-foss-2021b/OpenFOAM-9/src/thermophysicalModels/specie/lnInclude/rhoTabulatedI.H at line 122.
[1] 
FOAM parallel run aborting
Can someone please help me understand what's going on? I'm confused, because rPolynomial gives rho as a function of (p,T), and so does rhoTabulated.

Many thanks,
SP
sreehahaha is offline   Reply With Quote

Old   March 18, 2023, 03:56
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
The error message tells you that rhoTabulated<Specie>::E() is not implemented. Sure enough, if you look in the class inline source file (https://www.cfd-online.com/Forums/ne...ote=1&p=846511) you'll see:


Code:
template<class Specie>
inline Foam::scalar Foam::rhoTabulated<Specie>::E
 (
     scalar p,
     scalar T
 ) const
 {
     NotImplemented;
     return 0;
 }
... i.e. E is not implemented in this class. Infact you'll see that a whole bunch of thernodynamic functions are also not implemented, so this is probably not a good EOS for you to use.
Tobermory is offline   Reply With Quote

Old   March 18, 2023, 04:02
Default
  #3
New Member
 
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 3
sreehahaha is on a distinguished road
Thanks Tobermory for the quick reply.

Could you please suggest how I rectify this issue? I'm new to using OF. I think I have to use rhoTabulated as the rPolynomial I've been using isn't very accurate.

SP
sreehahaha is offline   Reply With Quote

Old   March 18, 2023, 04:08
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Sreehari

The short answer is that you can't use rhoTabulated at the moment - it doesn't do what you need it to do, i.e. solve the energy equation. I think your best bet is to try and improve the polynomial fit as best you can, and continue using rPolynomial.

Otherwise, you could try and implement your own version of the rhoTabulated class, and implement the energy functions ... however, there may be a good reason why they have not been implemented so far (I suspect that it's not just laziness on the Developer's side), and so this may be a dead end - I don't have enough knowledge of these particular EOS's to be able to comment.

Good luck!
Tobermory is offline   Reply With Quote

Old   March 18, 2023, 04:18
Default
  #5
New Member
 
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 3
sreehahaha is on a distinguished road
Thank you very much, Tobermory.

SP
sreehahaha is offline   Reply With Quote

Reply

Tags
equation of state, not implemented, rhopimplefoam, rhotabulated


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] ParaView command in Foam-extend-4.1 mitu_94 ParaView 0 March 4, 2021 13:46
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43


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