Hello,
Is there a way to extract power on each boundaries to check the thermal balance (GUI or user routine) with code saturne?
Is there an example or tutorial for this?
Best regards
Julien
thermal balance on boundaries
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4214
- Joined: Mon Feb 20, 2012 3:25 pm
Re: thermal balance on boundaries
Hello,
Yes, it is possible. Which version of the code are you using ? Do you want to compute the total flux, or visualize it ? The associated options and examples depend on this...
Regards,
Yvan
Yes, it is possible. Which version of the code are you using ? Do you want to compute the total flux, or visualize it ? The associated options and examples depend on this...
Regards,
Yvan
Re: thermal balance on boundaries
Hello Yvan,
I use CS 4.0.5. My first goal is to compute fluxes on boundaries to estimate where are the power losses of structures but I am also interested in vizualization.
Best regards
Julien
I use CS 4.0.5. My first goal is to compute fluxes on boundaries to estimate where are the power losses of structures but I am also interested in vizualization.
Best regards
Julien
-
- Posts: 4214
- Joined: Mon Feb 20, 2012 3:25 pm
Re: thermal balance on boundaries
Hello,
In this case, you should look for "balance" in the user examples in the Doxygen documentation.
For visualization, you should be able to activate appropriate output from the "surface variables" options in the GUI (caution, the fluxes are for both convection and diffusion, so fluxes will seem very high at inlets and outlets, so don't be surprised).
Regards,
Yvan
In this case, you should look for "balance" in the user examples in the Doxygen documentation.
For visualization, you should be able to activate appropriate output from the "surface variables" options in the GUI (caution, the fluxes are for both convection and diffusion, so fluxes will seem very high at inlets and outlets, so don't be surprised).
Regards,
Yvan
Re: thermal balance on boundaries
Hello,
It works well, visualization on boundaries is ok and I can read results in the listing file per boundaries.
If BC are exchange coefficient or prescribed flux, which color should I use? Maybe write my own routine?
Best regards
Julien
It works well, visualization on boundaries is ok and I can read results in the listing file per boundaries.
If BC are exchange coefficient or prescribed flux, which color should I use? Maybe write my own routine?
Best regards
Julien
Re: thermal balance on boundaries
And if I succeed to compute coupled cases CS with radiation in syrthes. How can I handle fluxes in user routine?
Best regards
Julien
Best regards
Julien
-
- Posts: 4214
- Joined: Mon Feb 20, 2012 3:25 pm
Re: thermal balance on boundaries
Hello,
What do you mean by "color" ? The user examples might use "colors" as group names for some selection criteria, but this depends on your mesh.
I am not sure I understand your second question. In any case, in user subroutines, you may use the functions from src/base/cs_post_util.f90 to extract boundary fluxes more easily.
Regards,
Yvan
What do you mean by "color" ? The user examples might use "colors" as group names for some selection criteria, but this depends on your mesh.
I am not sure I understand your second question. In any case, in user subroutines, you may use the functions from src/base/cs_post_util.f90 to extract boundary fluxes more easily.
Regards,
Yvan
Re: thermal balance on boundaries
Hello,
Sorry for the bad explanation. I call "color" different BC that are described in the cs_user_extra_operations-energy_balance.f90 file; there are cases for inlet, outlet, walls, dirichlet BCs associated each times with colors. I use instead of colors the name of groups defined in Salome mesh directly in the file as related in some posts in the forum. My question was, if I have different BC that those enonciated (for example exchange coefficient, or prescribed flux) can I compute also fluxes with this file or modify it?
My second question was about coupling with Syrthes. When I add cs_user_extra_operations-energy_balance.f90, I only compute diffusion and convection fluxes but no radiation between surfaces. So if I succeed to couple CS and Syrthes, how can I have all informations on fluxes? Maybe with Syrthes post tools...
I only find files named cs_post.c, cs_post.h, cs_post_default.c and cs_post_default.h in home/julien/code_saturne/code_saturne-4.0.5/src/base.
I was thinking that cs_user_extra_operations-energy_balance.f90 was the right tool to do this, but if there is something easier it's a good news!
Thank you again for your help Yvan.
Best regards
Julien
Sorry for the bad explanation. I call "color" different BC that are described in the cs_user_extra_operations-energy_balance.f90 file; there are cases for inlet, outlet, walls, dirichlet BCs associated each times with colors. I use instead of colors the name of groups defined in Salome mesh directly in the file as related in some posts in the forum. My question was, if I have different BC that those enonciated (for example exchange coefficient, or prescribed flux) can I compute also fluxes with this file or modify it?
My second question was about coupling with Syrthes. When I add cs_user_extra_operations-energy_balance.f90, I only compute diffusion and convection fluxes but no radiation between surfaces. So if I succeed to couple CS and Syrthes, how can I have all informations on fluxes? Maybe with Syrthes post tools...
I only find files named cs_post.c, cs_post.h, cs_post_default.c and cs_post_default.h in home/julien/code_saturne/code_saturne-4.0.5/src/base.
I was thinking that cs_user_extra_operations-energy_balance.f90 was the right tool to do this, but if there is something easier it's a good news!
Thank you again for your help Yvan.
Best regards
Julien
-
- Posts: 4214
- Joined: Mon Feb 20, 2012 3:25 pm
Re: thermal balance on boundaries
Hello,
For your first question, I believe the high level routines I mentioned should work with a prescribed flux or exchange coefficient.
Sorry, I mentioned cs_post_util.f90, but the file is actually post_util.f90.
I am not sure about radiation between surfaces, but using Syrthes's radiative module, it is also "transparent" to Code_Saturne, so the appropriate postprocessing should be on the Syrthes side. And the semi-transparent radiation module from Code_Saturne cannot be used in conjunction with Syrthes coupling yet (we need to refactor some boundary routines for this).
Regards,
Yvan
For your first question, I believe the high level routines I mentioned should work with a prescribed flux or exchange coefficient.
Sorry, I mentioned cs_post_util.f90, but the file is actually post_util.f90.
I am not sure about radiation between surfaces, but using Syrthes's radiative module, it is also "transparent" to Code_Saturne, so the appropriate postprocessing should be on the Syrthes side. And the semi-transparent radiation module from Code_Saturne cannot be used in conjunction with Syrthes coupling yet (we need to refactor some boundary routines for this).
Regards,
Yvan
Re: thermal balance on boundaries
Hello Yvan,
For the first question, do you mean that I can use (for example) for the dirichlet BC example in the cs_user_extra_operations-energy_balance.f90 file to calculate the flux for a heat transfert coefficient BC?
Talking of post_util.f90, I read the manuel and tutorials about routines but I don't know how to configure post_util.f90. I think I can't use directly this routine because I can't call boundaries ID directly in it with getfbr('name_boundary',nlelt,lstelt) and the name doesn't start with cs_user_something...
I read somewhere that I have to declare input arguments and maybe output (in: nfbrps -> number of boundary face to postprocess, in : lstfbr -> list of boundary faces to postprocess and out: btemp -> boundary temperature at selected face) of this routine in the runcase file and compile it with the terminal with the command "code_saturne compile". Am I right? Is there any examples somwhere?
Best regards
Julien
For the first question, do you mean that I can use (for example) for the dirichlet BC example in the cs_user_extra_operations-energy_balance.f90 file to calculate the flux for a heat transfert coefficient BC?
Talking of post_util.f90, I read the manuel and tutorials about routines but I don't know how to configure post_util.f90. I think I can't use directly this routine because I can't call boundaries ID directly in it with getfbr('name_boundary',nlelt,lstelt) and the name doesn't start with cs_user_something...
I read somewhere that I have to declare input arguments and maybe output (in: nfbrps -> number of boundary face to postprocess, in : lstfbr -> list of boundary faces to postprocess and out: btemp -> boundary temperature at selected face) of this routine in the runcase file and compile it with the terminal with the command "code_saturne compile". Am I right? Is there any examples somwhere?
Best regards
Julien