void reactingOneDim21::solveEnergy() { if (debug) { Info<< "reactingOneDim21::solveEnergy()" << endl; } tmp<volScalarField> alpha(solidThermo_.alpha()); dimensionedScalar Cp0("Cp0", dimEnergy/dimMass/dimTemperature, solidThermo_.composition().Cp(0, 1.0e05, 300.) ); dimensionedScalar Cp1("Cp1", dimEnergy/dimMass/dimTemperature, solidThermo_.composition().Cp(1, 1.0e05, 300.) ); fvScalarMatrix hEqn ( fvm::ddt(rho_, h_) - fvm::laplacian(alpha, h_) + fvc::laplacian(alpha, h_) - fvc::laplacian(kappa(), T()) == chemistrySh_ // - fvm::Sp(solidChemistry_->RRg(), h_) + solidChemistry_->RRs(0)*T()*Cp0 + solidChemistry_->RRs(1)*T()*Cp1 ); if (gasHSource_) { const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_)); hEqn += fvc::div(phiGas); } if (QrHSource_) { const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf()); hEqn += fvc::div(phiQr); } if (regionMesh().moving()) { surfaceScalarField phihMesh ( fvc::interpolate(rho_*h_)*regionMesh().phi() ); hEqn += fvc::div(phihMesh); } hEqn.relax(); hEqn.solve(); }
//--------------------------------------------------------------------------- void fun_hEqn( const basicPsiThermoHolder& thermo, const volScalarFieldHolder& rho, const volScalarFieldHolder& p, const volScalarFieldHolder& h, const surfaceScalarFieldHolder& phi, const compressible::turbulenceModelHolder& turbulence, const volScalarFieldHolder& DpDt ) { smart_tmp< fvScalarMatrix > hEqn( fvm::ddt( rho(), h() ) + fvm::div( phi(), h () )- fvm::laplacian( turbulence->alphaEff(), h() ) == DpDt() ); hEqn->relax(); hEqn->solve(); thermo->correct(); }
void reactingOneDim::solveEnergy() { if (debug) { InfoInFunction << endl; } tmp<volScalarField> alpha(solidThermo_.alpha()); fvScalarMatrix hEqn ( fvm::ddt(rho_, h_) - fvm::laplacian(alpha, h_) + fvc::laplacian(alpha, h_) - fvc::laplacian(kappa(), T()) == chemistrySh_ - fvm::Sp(solidChemistry_->RRg(), h_) ); if (gasHSource_) { const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_)); hEqn += fvc::div(phiGas); } if (QrHSource_) { const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf()); hEqn += fvc::div(phiQr); } if (regionMesh().moving()) { surfaceScalarField phihMesh ( fvc::interpolate(rho_*h_)*regionMesh().phi() ); hEqn += fvc::div(phihMesh); } hEqn.relax(); hEqn.solve(); }