Page 1 of 1

Energy Equation Subroutines and adding terms in it

Posted: Wed Apr 05, 2023 3:04 pm
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.

Re: Energy Equation Subroutines and adding terms in it

Posted: Thu Apr 13, 2023 6:40 pm
by hyder4
Dear Developer,
I was wondering if there is any update on this?
Kind regards,
Hyder.

Re: Energy Equation Subroutines and adding terms in it

Posted: Thu Apr 13, 2023 8:29 pm
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

Re: Energy Equation Subroutines and adding terms in it

Posted: Tue Apr 18, 2023 1:19 pm
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.

Re: Energy Equation Subroutines and adding terms in it

Posted: Tue Apr 18, 2023 1:52 pm
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

Re: Energy Equation Subroutines and adding terms in it

Posted: Tue Apr 18, 2023 4:03 pm
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

Re: Energy Equation Subroutines and adding terms in it

Posted: Wed Apr 19, 2023 1:22 am
by Yvan Fournier
Hello,

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

Best regards,

Yvan

Re: Energy Equation Subroutines and adding terms in it

Posted: Thu Apr 20, 2023 1:03 am
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.

Re: Energy Equation Subroutines and adding terms in it

Posted: Thu Apr 20, 2023 11:03 am
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