[Getdp] algebra of postprocessing results within time loop

Lars Rindorf lrf at teknologisk.dk
Wed May 9 11:53:06 CEST 2012


Hi everyone

I did a calculation some time ago on system with a heating element and a thermostat. When the temperature at a probe point exceeds, say, 100 C it shuts off, and switches on at 80 C. I didn't find an easy way to code this in getdp. So I calculated the on/off times by usual postprocessings, hardcoded the on/off times, and restarted the calculations. This is somewhat slow and clearly very crude and awkward.

Is there everyone who knows a good solution to this problem? I have included some code/pseudo code below. A solution would be useful also for other problems such as HP refinement or time loops with adaptive time stepping.

KR Lars Rindorf

Here is the code:

Resolution
{
                             { Name res_temp;
                                                          System
                                                          {
                                                                                       { Name B; NameOfFormulation form_temp;   }
                                                          }
                                                          Operation {
                                                                InitSolution B ;  SaveSolution B ; GenerateSeparate B ;
                                                               TimeLoopTheta {
                                                                                                                    Time0  t0 ; TimeMax t1 ; DTime dt ; Theta .5 ;
                                                                                                                    Operation {
                                                                                                                                                 Update[B, power []] ; // The function should be updated depending on the result of some post processing
                                                                                                                                                 Solve B ;
                                                                                                                                                 SaveSolution B;
                                                                                                                                                 // temperature at some point of system B:
                                                                                                                                                 PostOperation[po_Temp_at_probe]; // (This is ok with getdp)
                                                                                                                                                 // Pseudo code
                                                                                                                                                 Tprobe = temperature at some point of system B;
                                                                                                                                                 If ( Tprobe  > 100 C )
                                                                                                                                                                              Switch off power;
                                                                                                                                                 If ( Tprobe  < 80 C )
                                                                                                                                                                              Switch on power;

                                                                                                                    }
                                                                                       }
                                                          }

                             }
}
__________________________________
Lars Rindorf
Senior Consultant, Ph.D.
Center for Microtechnology and Surface Analysis, 6H
Danish Technological Institute
Gregersensvej, 2630 Taastrup, Denmark
Phone +45 72 20 33 67
Board +45 72 20 20 00
Fax +45 72 20 33 07
http://www.dti.dk/specialists/23601 (English)
http://www.teknologisk.dk/specialister/22767 (Dansk)
__________________________________
The contents of this e-mail are only for the confidential use of the intended addressees. If you are not such an addressee, or have reason to believe your address should not have been included, you are hereby notified that you have received this communication in error and that copying it, or in any way disseminating its contents to any other person, is strictly prohibited. If you have received this e-mail in error, please telephone or e-mail the sender immediately and destroy this copy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20120509/23a6f1f2/attachment.html>