Add temprature equation in openFoam solver???
Hi friends,
I want to add energy equation in below form: ddt(rho*Cp,T)+div(rho*Cp*U,T)=div(K*grad(T)) that rho and Cp and K vary with volume fraction.for example : rho = rho1*alpha+(1-alpha)*rho2; phi define with createCompressiblePhi.H How I can define rho*Cp*U in div??? I try it with below codes but T has very strange contour and values. surfaceScalarField phiEnergy ( IOobject : ( "phiEnergy", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(rho*Cp*U) & mesh.Sf() ); Thank you. |
Try using the energy equation used in compressibleInterFoam, it seems to be more stable because it doesnt use the cp in the convective term.
If you want to use your approximation then use: phicp= phi*fvc::interpolate(cp) You might also find other approximations in the forum ir you search a bit more |
Quote:
In my case in inlet and outlet i have high gradient but it isn't normal. how i can remove this unnatural treat??? |
Could you describe your testcase, BC, solver, etc?
|
Quote:
change in geometry that change to a circular channel. fisrt I convert settlingFoam from turbulence to laminar then i use it in flow in a circular pipe. My BC is the same there is in dahl case and for temperature for top patch: top { type groovyBC; valueExpression "298"; variables "q=20000;"; gradientExpression "q/K"; fractionExpression "0"; timelines(); value uniform 298; } K is thermal conductivity. |
All times are GMT -4. The time now is 04:50. |