CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   combustion, rk4 method third for time accuracy (https://www.cfd-online.com/Forums/openfoam-programming-development/236052-combustion-rk4-method-third-time-accuracy.html)

sanjeev_adhikari May 11, 2021 22:03

combustion, rk4 method third for time accuracy
 
Hello everyone,


OF231
(I had posted it in main CFD forum earlier )


This is the follow up post of my earlier thread as i didn't find error after long check out. However i realized that there is no combustion(no reaction and no heat release )in the simulation so i am getting lower temperature. Combustion was working fine before upgrading time accuracy using rk4 method.

Also i checked by writing reaction rate independently it shows the concentration for other species too. Also, it concentration of initial species is computed which shows the transport of the species is working. But in overall combustion is not taking place even when the flow temperature at the stagnation region reaches more than 2700K.

i checked chemistry properties and combustion both are on and true. Also i am using "rhoCombustionModel" . can anyone suggest possible solution or error on the fomulation of species and energy equation specially involving reaction. Thank you.



I was facing the problem with time accuracy of the solution using first order Euler ddt. So, i thought of implementing rk4 third order time accuracy. Following represents the
equations:

rho = rhoOld + rkCoef[cycle] *runTime.deltaT()*(-fvc::div(Riemann.rhoFlux()))


momentum equations.
rhoU = rhoUOld + rkCoeff[cycle]*runTime.deltaT()*(-fvc::div(Riemann.rhoUFlux())+fvc::div(tauMC)+fvc:: laplacian(muEff, U));



species transport eqn:
fvScalarMatrix YiEqn
(
rhoYi - rhoYOldi
- rkCoeff[cycle]*runTime.deltaT()*(-fvc::div(Riemann.rhoScalarFlux(i))+
fvm::laplacian(turbulence->muEff(), Yi))
== rkCoeff[cycle]*runTime.deltaT()*reaction->R(Yi)
);


energy eqn


rhoE = rhoEOld + rkCoeff[cycle]*runTime.deltaT()*(
--fvc::div(Riemann.rhoEFlux() + fvc::div(sigmaDotU) + fvc::laplacian(turbulence->alphaEff(), h)
+fvc::laplacian(k,T)+reaction->Sh());

OF2.3.1


ps: courant number and timesteps are calculated as per rhocentralFoam.


Thank you all.


All times are GMT -4. The time now is 05:25.