CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Why sovle e p U but not T p U in sonicFoam? (https://www.cfd-online.com/Forums/openfoam-solving/78264-why-sovle-e-p-u-but-not-t-p-u-sonicfoam.html)

universez July 16, 2010 09:43

Why sovle e p U but not T p U in sonicFoam?
 
Hi, I am just curious why variable solved in sonicFoam are e p U. Then, calcualte T using function

inline scalar T (scalar f, scalar T0, scalar (specieThermo::*F)(const scalar) const, scalar (specieThermo::*dFdT)(const scalar) const ) const

of class specieThermo.

What is the benifit comparing to solve T p U.


Thanks, yu.

herbert July 19, 2010 08:11

Hi Yu,

I think it is easier to include temperature-dependent thermodynamic properties (especially the heat capacity) when solving for e instead of T.

Regards,
Stefan

universez July 19, 2010 08:28

Stefan,

Thank you for your reply.

I agree. It will make a implict couple between heat capacity and temperature.

Is that possible that solving e will give more smoother result than solving T? So, solving e will be more numerically stable>

Thanks

Yu

Quote:

Originally Posted by herbert (Post 267997)
Hi Yu,

I think it is easier to include temperature-dependent thermodynamic properties (especially the heat capacity) when solving for e instead of T.

Regards,
Stefan


universez July 19, 2010 16:25

I guess that there are several difficulties to solve T instead of e.

1, solving e is to solve Cv*T, but involves only one variable, which makes code easier.

2, in openfoam, solving Cv*T is not straight forward. I tried different ways to put Cv in the equation, this one works,

{
solve
(
Cv*fvm::ddt(rho, T)
+ Cv*fvm::div(phi, T)
- Cv*fvm::laplacian(turbulence->alphaEff(), T)
==
- p*fvc::div(phi/fvc::interpolate(rho))
);
}

However, it separate Cv and T, and make the scheme less accurate.


All times are GMT -4. The time now is 00:22.