synthetik-technologies / blastfoam

A CFD solver for multi-component compressible flow with application to high-explosive detonation, explosive safety and air blast
Other
215 stars 96 forks source link

tabulatedEOS error #72

Open DanielM1123 opened 1 year ago

DanielM1123 commented 1 year ago

Dear blastFOAM team,

I am doing a test case for a real gas properties table in the shockTube_tabulated tutorial case with tabulatedEOS as the equation of state, hTabulated as the thermodynamic model and tabulated as the viscosity model. However, when I start blastFoam, I get an error saying that tabulatedEOS does not find a declaration matching S. The log file is attached to this post.

Best regards, Daniel log.blastFoam_shockTube_calculated.txt

Liu0813 commented 1 year ago

Hi, Daniel, I also found this bug. This was caused by the mistaken implement of the function S. https://github.com/synthetik-technologies/blastfoam/blob/1d54dd98120ef20714da224609ac8563559bcf6d/src/thermodynamicModels/specie/equationOfStates/tabulatedThermoEOS/tabulatedThermoEOSI.H#L322-L330

You can fix it by modifying the file tabulatedEOSI.H.

template<class Specie>
Foam::scalar Foam::tabulatedThermoEOS<Specie>::S
(
    const scalar p,
    const scalar e,
    const scalar T
) const
{
    NotImplemented;
    return 0.0;
}
DanielM1123 commented 1 year ago

Hi Liu,

thank you for your answer. It worked for me and I do not get this error message anymore. However, when I am starting a simulation now with the combination of tabulatedEOS and hTabulated, I get an error that Foam::scalar Foam::tabulatedEOS::H(Foam::scalar, Foam::scalar, Foam::scalar) is not implemented, even when I am commenting NotImplemented out. Does anyone have encountered this error?

Best regards, Daniel