Page 1 of 1

thermostat

Posted: Mon Aug 26, 2013 5:42 pm
by ruedavallejo
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

Re: thermostat

Posted: Tue Aug 27, 2013 10:10 am
by Yohann Eude
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

Re: thermostat

Posted: Tue Aug 27, 2013 4:17 pm
by ruedavallejo
Thanks Yohann,

Nestor