|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 ![]() |
Hi all,
I am working on the calculation of hypersonic flows using 'rhoCentralFoam' solver. But I cannot make the 'wallHeatFlux' utility working at the post-processing stage. I always get the same error message: ---------------------------------------------------------------------------------------------------------------------------------- --> FOAM FATAL ERROR: Not implemented From function basicThermo::h() in file basicThermo/basicThermo.C at line 259. FOAM aborting ---------------------------------------------------------------------------------------------------------------------------------- Any help would be much appreciated, Thank you all Romain PS: is there any adaptive mesh refinement utility with rhoCentralFoam? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 ![]() |
any help would be extremely appreciated since I am running a validation case and cannot progress without heat fluxes,
thank you, Romain |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13 ![]() |
Dear all,
I work with RomW at this validation case. I am looking at the source code to try to understand why it does not work. I admit to be a beginner with C++, even if I have some experience with object oriented programming. As it can be stated by the error stack trace the error rise within the method BasicThermo.h(), but if I look in the method definition I find this: Code:
Foam::volScalarField& Foam::basicThermo::h() { notImplemented("basicThermo::h()"); return const_cast<volScalarField&>(volScalarField::null()); } I have just noticed that before to call the BasicThermo.h() method the tool calls the basicThermo::New(mesh) static method Code:
autoPtr<basicThermo> thermo ( basicThermo::New(mesh) ); If anyone knows this problem or may be can give me some tips to spot it within the source code please let us know. Thanks |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13 ![]() |
I think we found where the issue originates.
Actually the ePsiThermo that we implement does not provide the hentalpy, since it is energy based. Once we switched to hRhoThermo wallHeatFlux worked. However the problem is yet to be resolved since this model is not implemented for rhoCentralFoam. Therefore I am trying a walk around slightly modifying the wallheatFlux source code. I have planned to calculate the hentalpy starting from the temperature and the Cp, but unlikely I am very new to openFoam and C++ and I cannot even perform a simple moltiplication. I would like to multiply two volScalarField but seems that the operator* is not defined for this class. Anybody can help me with this simple (non for me) task? ![]() |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Jun 2012
Posts: 76
Rep Power: 14 ![]() |
Hey alexmogavero,
my approch would be to use the internal energy "e" and convert it to the enthalpy "h". Then, one could reuse the rest of the code from wallHeatFlux.C. However, I'm not sure about the conversion. As far as I recall, one can use: h = e*kappa; Maybe someone could confirm this or recommend an other approch? Regards |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13 ![]() |
Thank you maHein!
I am glad to know that there is someone else which confirm my concerns. I can confirm the validity of your formula, tough it is strictly valid for perfect gas with constant specific heat. However it will suite well to me for now. Do you have any idea on how to make simple operations between object of the class volScalarField? |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Jun 2012
Posts: 76
Rep Power: 14 ![]() |
I implemented the equation by modifying the wallHeatFlux source code. I simply introduced a new scalar called kappa wih a value of 1.4 (isentropic exponent of air) and changed the equation, where the heat flux is calculated to:
Code:
surfaceScalarField heatFlux ( fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(e)*kappa ); However, in this case, kappa is hard coded into the program. I guess it is also be possible to read it from the thermodynamic properties / calculate it via the thermodynamics libraries. So this is a more quick-and-dirty method ![]() |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Join Date: Jun 2012
Posts: 76
Rep Power: 14 ![]() |
Like I said, you can directly get kappa from the thermodynamic model by:
volScalarField kappa = thermo->Cp() / thermo->Cv(); So this way the programm shoud be comprehensive for gases other than air. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
Alessandro Mogavero
Join Date: Nov 2012
Location: Glasgow
Posts: 15
Rep Power: 13 ![]() |
Thank you for your help, now it works!
I agree with your equation for calculating the K so to include every gas, but I am afraid it works just for constant specific heat, since in case of non constant Cp (thus non constant K) an integration over a certain temperature range would be needed. |
|
![]() |
![]() |
![]() |
Tags |
heat flux, rhocentralfoam |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
wallShearStress not work for rhoCentralFoam | mechy | OpenFOAM | 0 | July 25, 2011 01:48 |