Enthalpy equation in code_saturne

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Enthalpy equation in code_saturne

Post by hyder4 »

Hi,
I am Running 2D convergence nozzle with Enthalpy equation in version 7.1.2. the area ratio is 4 so the pressure and velocity change along x direction is significant.
The Enthalpy equation described in theory guide page 17 is as follows:
Screenshot (13).png
Enthalpy equation
(14.48 KiB) Not downloaded yet
here dp/dt is the lagrangian derivative of pressure.

Since pressure and velocities are changing I should expect change in Enthalpy (should be decreasing ) but I see not change at all.
I have attached the setup and subroutines I am using.
Attachments
setup.xml
(11.17 KiB) Downloaded 39 times
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Enthalpy equation in code sauterne

Post by hyder4 »

Subroutines used
Attachments
cs_user_initialization-base.c
(3.68 KiB) Downloaded 41 times
cs_user_physical_properties.f90
(5.76 KiB) Downloaded 35 times
cs_user_parameters.c
(3.29 KiB) Downloaded 40 times
Yvan Fournier
Posts: 4053
Joined: Mon Feb 20, 2012 3:25 pm

Re: Enthalpy equation in code sauterne

Post by Yvan Fournier »

Hello,

I am not sure what is really coded here, since we do not compute Lagrangian derivatives (to my knowledge). If this is a simple unsteady term, that would be more consistent with your results. I'll be happy if someone who is more familiar with this part of the theory guides would answer in my place here, but I have the impression that something might be lost when moving from the Lagrangian theory to Eulerian operators (i.e. things might be simplified and some terms dropped).

Checking the actual code is of course the safest solution, even if it takes a bit of extra time. That would be in covofi.f90 for versions 8.0 and older, and cs_solve_equation.c in the master (dev) branch.

Best regards,

Yvan
Post Reply