Hi group, first of all, thanks for such a great software.
I'm simulating a refrigerator in CS V3.0 the steady state runs fine. Next step is to implement a thermostat in order to turn on or off the heat flux. Any example or tip on how to do it?
Kind regards,
Nestor
thermostat
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 19
- Joined: Mon Aug 12, 2013 9:36 am
Re: thermostat
Hi Nestor,
I don’t have any example of thermostat but i recommand you to code your thermostat in cs_user_boundary_conditions.f90.
First estimate the mean temperature in your refrigerator. For that use the command:
Getcell(‘all[]’, nlelt, lstel) to obtain the list of all cells in your refrigerator.
Then do a loop on lstelt and compute the sum of total volume and the sum of the temperature*volume. Use the command parsom() to sum for all processors the total volume and the temperature*volume and calculate the mean temperature by the devision of theses two values.
Then use the command getfbr(…) for your boundary condition and see in the examples of your SRC directory to impose a heat flux. You will need just to put a flag depending of your average temperature to change the heat flux.
If you need to have the temperature only at one point in your refrigerator, you have an example in cs_user_extra_operation_1d_profil.f90 for a line (multi points).
I hope it will help you.
Yohann
I don’t have any example of thermostat but i recommand you to code your thermostat in cs_user_boundary_conditions.f90.
First estimate the mean temperature in your refrigerator. For that use the command:
Getcell(‘all[]’, nlelt, lstel) to obtain the list of all cells in your refrigerator.
Then do a loop on lstelt and compute the sum of total volume and the sum of the temperature*volume. Use the command parsom() to sum for all processors the total volume and the temperature*volume and calculate the mean temperature by the devision of theses two values.
Then use the command getfbr(…) for your boundary condition and see in the examples of your SRC directory to impose a heat flux. You will need just to put a flag depending of your average temperature to change the heat flux.
If you need to have the temperature only at one point in your refrigerator, you have an example in cs_user_extra_operation_1d_profil.f90 for a line (multi points).
I hope it will help you.
Yohann