# The Energy equation in chtMultiRegionFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 8, 2018, 14:42 The Energy equation in chtMultiRegionFoam #1 New Member   Wenming Yang Join Date: Jun 2018 Posts: 26 Rep Power: 3 Dear Foams, I am trying to figure out the chtMultiRegionFoam solver and willing to change it on my own. But I have some doubts about the energy equation (EEqn.H) in it. In the file EEqn.H, the energy equation based on enthalpy [J/kg] is defined as fvScalarMatrix EEqn ( fvm::ddt(rho, he) + fvm::div(phi, he) + fvc::ddt(rho, K) + fvc::div(phi, K) + ( he.name() == "e" ? fvc::div ( fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)" ) : -dpdt ) - fvm::laplacian(turb.alphaEff(), == rho*(U&g) + rad.Sh(thermo, he) + fvOptions(rho, he) ); My doubt concentrate on the terms including "phi" in the second and fourth terms. It is defined in file "createFluidRields.H" and "setRegionFluidFields.H" as phiFluid.set ( i, new surfaceScalarField ( IOobject ( "phi", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(rhoFluid[i]*UFluid[i]) & fluidRegions[i].Sf() ) ); surfaceScalarField& phi = phiFluid[i]; My question is, the dimension of "ddt(rho,he)" is J/(s m^3), while that of the terms including phi (= rho*U*Sf) is J/s. They are not same. I donot know where the problem comes from. Thank you in advance.

 October 11, 2018, 09:17 #2 Member   Mehdi Aminyavari Join Date: Feb 2016 Location: Milan Posts: 35 Rep Power: 5 Dear Wenming, when you were dimension analyzing ""ddt(rho,he)", you came up correctly with J/(s m^3) which means you considered that d/dt ads a "s" to denominator! but you are neglecting grad dimension when calculating the "fvm::div(phi, he)"! divergence adds m^3 to the denominator and like that you are all set. Hope it is clear enough

 October 12, 2018, 03:47 #3 New Member   Wenming Yang Join Date: Jun 2018 Posts: 26 Rep Power: 3 Dear Mehdi, Thank you for your reminding. That' s my fault. A minor question, my understanding is, the divergence operation should add a dimension of m^-1. I do not know where is the problem. Mehdi3031 likes this.

 October 12, 2018, 11:51 #4 Member   Mehdi Aminyavari Join Date: Feb 2016 Location: Milan Posts: 35 Rep Power: 5 actually you are right about the divergence, I mistakenly thought But it is Now I don't know... Strange!

 Tags chtmultiregionfoam, energy equation