Difference between revisions of "ChtMultiRegionFoam"
(→Energy conservation) |
(→Equations Fluid) |
||
Line 112: | Line 112: | ||
The energy equation can be found in: https://cfd.direct/openfoam/energy-equation/ | The energy equation can be found in: https://cfd.direct/openfoam/energy-equation/ | ||
− | The total energy of a fluid element can be seen as the | + | The total energy of a fluid element can be seen as the sum of kinetic energy <math> k = 0.5 u_i u_i </math> and internal energy <math> e </math> . |
+ | The rate of change of the kinetic energy within a fluid element is the work done on this fluid element by the viscous forces, the pressure and eternal volume forces like the gravity. | ||
+ | |||
+ | <table width="70%"><tr><td> | ||
+ | <center><math> | ||
+ | |||
+ | \frac{ \partial (\rho k)}{\partial t} + \frac{\partial}{\partial x_j} \left( \rho {u}_j k \right) = - \frac{\partial p u_j} {\partial{x_i} }- \rho g_j u_j + | ||
+ | \frac{\partial}{\partial x_j}\left( \tau_{ij} u_i \right) | ||
+ | |||
+ | |||
+ | |||
+ | </math></center> | ||
+ | </td><td width="5%">(2)</td></tr></table> | ||
===Equations Solid=== | ===Equations Solid=== | ||
==Source Code== | ==Source Code== |
Revision as of 12:29, 3 November 2018
ChtMultiRegionFoam
Solver for steady or transient fluid flow and solid heat conduction, with conjugate heat transfer between regions, buoyancy effects, turbulence, reactions and radiation modelling.
Contents
1 Equations
For each region defined as fluid, the according equation for the fluid is solved and the same is done for each solid region. The regions are coupled by a thermal boundary condition.
1.1 Equations Fluid
For each fluid region the compressible Navier Stokes equation are solved.
1.1.1 Mass conservation
The variable-density continuity equation is
| (1) |
The source code can be found in src/finiteVolume/cfdTools/compressible/rhoEqn.H:
{ fvScalarMatrix rhoEqn ( fvm::ddt(rho) + fvc::div(phi) == fvOptions(rho) ); fvOptions.constrain(rhoEqn); rhoEqn.solve(); fvOptions.correct(rho); }
1.1.2 Momentum conservation
| (2) |
represent the velocity, the gravitational acceleration, the pressure minus the hydrostatic pressure and and are the viscose and turbulent stresses.
The source code can be found in Ueqn.H:
// Solve the Momentum equation MRF.correctBoundaryVelocity(U); tmp<fvVectorMatrix> tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) + turbulence.divDevRhoReff(U) == fvOptions(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) )*mesh.magSf() ) ); fvOptions.correct(U); K = 0.5*magSqr(U); } fvOptions.correct(U);
1.1.3 Energy conservation
The energy equation can be found in: https://cfd.direct/openfoam/energy-equation/
The total energy of a fluid element can be seen as the sum of kinetic energy and internal energy . The rate of change of the kinetic energy within a fluid element is the work done on this fluid element by the viscous forces, the pressure and eternal volume forces like the gravity.
| (2) |