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 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(); }
void reactingOneDim::solveEnergy() { if (debug) { Info<< "reactingOneDim::solveEnergy()" << endl; } const volScalarField rhoCp(rho_*solidThermo_.Cp()); const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf()); const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_)); fvScalarMatrix TEqn ( fvm::ddt(rhoCp, T_) - fvm::laplacian(K_, T_) == chemistrySh_ + fvc::div(phiQr) + fvc::div(phiGas) ); if (moveMesh_) { surfaceScalarField phiMesh ( fvc::interpolate(rhoCp*T_)*regionMesh().phi() ); TEqn -= fvc::div(phiMesh); } TEqn.relax(); TEqn.solve(); Info<< "pyrolysis min/max(T) = " << min(T_).value() << ", " << max(T_).value() << endl; }