Energy Equation Subroutines and adding terms in it

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

Energy Equation Subroutines and adding terms in it

Post by hyder4 »

Dear Developers,
I just started PhD and my work is mostly on DNS. I want to add few terms in the energy equation.
Is it possible if you can point out what subroutine(s) the software solves the energy equation? and is there a way I can add terms in it?
Kind regards,
Hyder.
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Energy Equation Subroutines and adding terms in it

Post by hyder4 »

Dear Developer,
I was wondering if there is any update on this?
Kind regards,
Hyder.
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Energy Equation Subroutines and adding terms in it

Post by Yvan Fournier »

Hello,

Which "energy equation" are you referring to exactly relative to the formulation and algorithm used in code_saturne ? Turbulent kinetic energy (not in DNS), thermal internal or total energy (for compressible flowà, ... ?

Did you check user examples in the documentation ?

Regards,

Yvan
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Energy Equation Subroutines and adding terms in it

Post by hyder4 »

Hello,
Sorry I mean is this energy equation.
Eq 1.png
(3.18 KiB) Not downloaded yet
or this
Eq 2.png
(5.79 KiB) Not downloaded yet
.
Best regards,
Hyder.
Attachments
Gao, Pitz, Chew_2020_International Journal of Heat and Mass Transfer_Numerical investigation of buoyancy-induced flow in a sealed rap(2) (1).pdf
(1.56 MiB) Downloaded 43 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Energy Equation Subroutines and adding terms in it

Post by Yvan Fournier »

Hello,

So it seems that what you are interested in is the heat equation. What sort of terms do you need to add ? If it is source terms, that is easy, and there are many user-defined examples in the code. Some cases may even be handled in the GUI.

I also recommend starting with a very simple mesh and case so as to be able to experiment with a fast turnaround time.

Regards,

Yvan
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Energy Equation Subroutines and adding terms in it

Post by hyder4 »

Hi,
The terms I want to add depends on what heat equation the code_saturne is solving at the moment. may I ask if its solving equation 1
Eq 1.png
(3.18 KiB) Not downloaded yet
or equation 2
Eq 2.png
(5.79 KiB) Not downloaded yet
?
One of my senior is also using code saturne. he believes code_saturne solves equation 1.
Best regards,
Hyder
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Energy Equation Subroutines and adding terms in it

Post by Yvan Fournier »

Hello,

The info on the equations solved is given in the first 20 pages of the theory manual.

Best regards,

Yvan
hyder4
Posts: 22
Joined: Tue Apr 04, 2023 12:06 am

Re: Energy Equation Subroutines and adding terms in it

Post by hyder4 »

Hi,
Just looked at it Thank you. I am also curious to know in what subroutines they are being solved. is there a way I can know that as well?
Best,
Hyder.
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Energy Equation Subroutines and adding terms in it

Post by Yvan Fournier »

Hello,

Depending on the code version (and progress on migration from Fortran to C), the exact files can vary, but you can start by looking at the "scalai" function, which contains the loop on scalars.

Regards,

Yvan
Post Reply