|
[Sponsors] |
How rho_ and psi_ are calculated in compressible solvers of OpenFOAM? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 10, 2012, 11:29 |
How rho_ and psi_ are calculated in compressible solvers of OpenFOAM?
|
#1 |
New Member
James Behzadi
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 27
Rep Power: 14 |
Dear FOAMers,
I need to know how the density and compressibility are updated in OpenFOAM? The question has a general scope and applies to many compressible thermophysical models and solvers. I divide my question in two parts: 1. In pEqn.H of all compressible solvers (dieselFOAM, sonicFOAM, reactingFOAM, etc.) there is a line that reads Code:
rho = thermo.rho(); Code:
//- Density [kg/m^3] - uses current value of pressure virtual tmp<volScalarField> rho() const { return p_*psi(); } 2. Assuming that my impression of rho_ calculation is correct, we need to know psi() to find density, that is we need to know the compressibility. This raises two more questions: 2.1 My survey led to the speculation that psi_ is updated in hsPsiThermo.C. Code:
TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); 2.2 If above is correct, then I need to know how the psi(p, T) works. I could find THs function in specieThermoI.H which basically updates temperature based on a given sensible ehthalpy and known composition mixture by an iterative method. However, I couldn't locate such a function for psi_ calculation. The only thing I could think of was the equation of state for perfect gas in perfectGasI.H Code:
inline Foam::scalar Foam::perfectGas::psi(scalar, scalar T) const { return 1.0/(R()*T); } I appreciate it, if you could answer any of the above three questions. Any clue will be of great value to me. Thanks in advance... |
|
Tags |
compressibility, density, psi_, rho_, thermo.rho() |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help with boundary conditions: open to atmosphere | Wolle | OpenFOAM | 2 | April 11, 2011 07:32 |