Any clues?. It seems we have to upload the question to the bug tracker.
Regards. |
|
1 Attachment(s)
Hi,
I'm trying to simulate exactly the same case, but I get very unphysical solutions even using the internal energy formulation. I also tried your proposal concerning the EEqn.H file without any success. You said you were able to reproduce the adiabatic compression, so I would appreciate it if you had a look at my settings or if you shared me your case. |
rhoPimpleDyMFoam: Adiabatic expansion
1 Attachment(s)
Quote:
I tried your case without modifying it and i get bad results too. I made the following modifications, File: /0$ U If you want to reproduce an expansion, you should set for the "top" velocity the same velocity of the "patch", in this case, 0.1 m/s for the third coordinate. Remember that the type "fixedValue" indicates absolute velocities. If you want to set relative to domain velocities you can use type "movingWallVelocity". File: /system$ fvSolution I added in the subdictionary PIMPLE the flag "correctPhi" equal to "no". The correctPhi equation makes the linear solver to diverge. For compressible fluids, i think that this equation is no necessary as the non conservative effects due to the mesh change in the flux are absorbed by the density equation. I run the case with a time step of 0.001s from time 0 to time 1s and the adiabatic expansion was obtained successfully. Quote:
I hope this can help you, Regards, Horacio |
Hi Horacio Aguerre,
thank you very much for the correction of my case and the detailed explanation, this really helps a lot! Regards |
Hi ,Horacio Aguerre
could you see my problem and tell some thing?I think you can answer my question.I moves fireFoam of 2.0.1 to 2.2.1,then rewrite hEqn according to the EEqn.H in fireFoam of 2.2.1 and other necessary codes.But ,when I wmake my rewrited fireFoam,it gives me errors:undefine div(phi,h) in fvscheme. The following is codes of EEqn.H: { volScalarField& he = thermo.he(); 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(turbulence->alphaEff(), he) == fvOptions(rho, he) ); EEqn.relax(); fvOptions.constrain(EEqn); EEqn.solve(); fvOptions.correct(he); thermo.correct(); Info<< "T min/max = " << min(T).value() << ", " << max(T).value() << endl; } There is div(phi,he) insteading of div(phi,h),So It should be no need to define (phi,h) in fvshceme,but define div(phi,he).However,I see the fvsheme in smallpoolfire2D of 2.2.1,there indeed is div(phi,h).In fact,there is the term of "div(phi,he)" in EEqn.H,why define div(phi,h) in fvsheme?I think I have some thing not understand.! http://www.cfd-online.com/Forums/ima...ser_online.gif http://www.cfd-online.com/Forums/ima...reputation.gif http://www.cfd-online.com/Forums/ima...ons/report.gif http://www.cfd-online.com/Forums/ima...c/progress.gif |
Energy variables
Quote:
The EEqn is able to solve the energy balance in terms of enthalpy ("h") or internal energy ("e"). Both balances have common expresions. For this expresions it is used the generic energy variable "he". However the expresions differ. Then appears the conditional statement that selects the appropiate source term for the respective form of energy. Code:
he.name() == "e" In fvSchemes and in fvSolution you must set for the energy parameters the name "he.name()" If you choose enthalpy "he.name()=h" you must define "div(phi,h)" in fvSchemes. If you choose internal energy "he.name()=e" you must define "div(phi,e)" in fvSchemes. In the OpenFOAM official web site there is an explanation on how to set up the thermophysical properties. HTML Code:
http://www.openfoam.org/docs/user/thermophysical.php Horacio |
Thanks ,Horacio Aguerre!It is kind of you!
|
Dear Horacio Aguerre:
Thank you for your last reply!I have another problem I would like to consult you.In my thermophysicalPropertise,I want to define thermo type like this: thermoType { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; energy absoluteEnthalpy; equationOfState perfectGas; specie specie; }I want use "absoluteEnthalpy;",but when I run my case,it tells me have no this thermo combination.I found just "psiuReactionThermo" Class can use absoluteEnthalpy. "psiReactionThermo"and "rhoReactionThermo"can not use absoluteEnthalpy.They only have sensibleEnthalpy.My case have chemical reaction and I must use absoluteEnthalpy,can you give me advise how to change my thermo type?Thanks again! |
Henry changed the code using the snippet suggested by Horacio, but in pEqn.H
https://github.com/OpenFOAM/OpenFOAM...d6c6406b07d7bb Regards. |
Quote:
"Balance of a tensorial property in an arbitrary moving domain" in the equation left hand side looks like reynolds transport theorem. Can I know what is on RHS. And the term on RHS of blacance of mechanical energy [p(napla.V) +t:napla.V] physically mean? Thanks and regards |
All times are GMT -4. The time now is 18:51. |