|
[Sponsors] |
Problem/Bug using enthalpy as thermodynamic model with rhoCentralFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 17, 2023, 13:44 |
Problem/Bug using enthalpy as thermodynamic model with rhoCentralFoam
|
#1 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 8 |
Hello all,
the long version of the problem is described in this thread: Wrong Solution for sensibleEnthalpy I could reconstruct this case and it seems, that rhoCentralFoam only works with sensibleInternalEnergy as energy variable and not with internalEnthalpy. I also used the sod shock tube. I tried to figure out the problem. Since I am not an expert on C++, I would like to hear your opinion. I think the problem is, that enthalpy h is assumed to be equal to internal energy e, which is not correct, but for incompressible flow the assumption is okay, like Bloerb described it in the thread meantioned above. The bug report https://bugs.openfoam.org/view.php?id=571 also mentioned this problem. I am struggling to find this issue in the code and maybe someone can help me out. The energy variable e used in rhoCentralFoam is defined as: Code:
volScalarField& e = thermo.he(); Further, he is derived from: Code:
template<class Thermo, template<class> class Type> inline Foam::scalar Foam::species::thermo<Thermo, Type>::he(const scalar p, const scalar T) const { return this->HE(p, T)*this->W(); } HE is derived from Code:
// Sensible enthalpy [J/kg] scalar HE ( const Thermo& thermo, const scalar p, const scalar T ) const { return thermo.Hs(p, T); } Hs is derived from: Code:
template<class EquationOfState> inline Foam::scalar Foam::hConstThermo<EquationOfState>::Hs ( const scalar p, const scalar T ) const { return Cp_*T + EquationOfState::H(p, T); } This concludes: e=cp*T, which is wrong. It is easily tricked by specifying for Cp the value of Cv. I tried it and it produced the right answers. Thoughts? Did I make a mistake? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
viewFactor radiation model stuck | shach934 | OpenFOAM | 1 | May 25, 2021 12:01 |
Need help to implement turbulence model in rhoCentralFoam | Calmly | OpenFOAM Running, Solving & CFD | 1 | October 6, 2020 11:06 |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
user defined enthalpy for heat exchanger model | jackstraw | Fluent UDF and Scheme Programming | 0 | December 23, 2015 04:53 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |