|
[Sponsors] |
Calculating Cp, gamma and others during runtime |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 5, 2020, 16:45 |
Calculating Cp, gamma and others during runtime
|
#1 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Hi,
I would like to calculate the specific heat capacity cp, specific heat ratio gamma and Ma number during the computation. I have compiled a new solver based on rhoCentralFoam for this purpose. In createFields.H I have added: Code:
volScalarField cp ( IOobject ( "cp", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo.Cp() ); volScalarField gamma ( IOobject ( "gamma", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo.gamma() ); volScalarField Ma ( IOobject ( "Ma", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mag(U)/sqrt(thermo.gamma()*thermo.p()/thermo.rho()) ); I wanted to add also the total temperature and total pressure for compressible fluids to be calculated during runtime, but I would like to calculate them using the Mach Number, which is not calculated right at the moment. Can anyone tell what I did wrong? Kind regards, shock77 |
|
|
|