[Getdp] External parameters in transient simulation

Bernhard Kubicek bernhard.kubicek at arsenal.ac.at
Fri Jan 4 10:17:37 CET 2008

Dear List,

A colleague and me are working on an esoteric kind of simulation. We
need to solve heat conduction equation with nonlinear diffusion
coefficient on a 2d rectangular strip. On the left and right boundary
lines, we need to have heat exchange with an reservoir.
However, the reservoir's temperature decreases with the integral of all
energy/temperature in the strip, because it is a closed/adiabatic
coupled system.
It should be a transient simulation.
Therefore it would be nice to have a global scalar quantity that is the
integral over the temperature in the 2d strip, accessible so I can store
it as a value in a getdp variable, which then is used the TimeFunction
boundary values. And updated in a transient simulation.
1)Is there a way to do this?

Currently, I have a "workaround": I start getdp with a couple of
timesteps, than call a postprocessing which does the PostIntegration and
outputs the integral to a file. Then using a shell script, a .pro file
is created with the line
This .pro file is included in the general problem definition.
Afterwards getdp is started again using -restart to continue to the
changed final time, while the IntegralValue is used in the Timefunction
Boundary Conditions.
However, if for testing purposes, i don't vary the included pro file per
restart, one would expect that that there should be no difference in the
results, weather getdp just calculates in one go to the final time, or
in multiple junks using -restart. 
However, there are differences of up to 10% in my case and I could not
find the error yet.
2) Could this in principle work?

3) Is it possible to output global variable or function values within a
timeloop to the screen for debugging purposes? 

Thank you very much,
and very nice greeting from frozen Vienna,
 Bernhard Kubicek