Error control

General discussions about how to formulate a script for FlexPDE.

Error control

Postby quissy on Tue Apr 17, 2012 3:49 am

Hello,

I'm trying to solve a time-dependent problem with heating by induction, heat and mass transfer in media with different porosities, and a boiling model in porous media developed by Bernard et al. (in the scripts I present a really simplified version). I'm using the free version of FlexPDE 6.2.
I first solve a stationary problem (coupled_v3simple.pde) with wator being everywhere.
Then, for the time dependent problem (coupled_v3simple_time.pde), I do not solve the maxwell equations any more, but I simply use the heating power calculated before.
I plot the interesting physical entities, but also the resolved equations (control_tempp corresponds for example to the equation f(x,t) in EQUATIONS tempp: f(x,t)= 0 ). I would expect all those control-variable to be 0, once the problem is solved. This holds for the steady state program.
I now encounter different problems in the transient program and I ask me some questions:

1) When importing the steady state results in the transient program, the control-variables in the initial solution are not the same as plotted in the steady state program. I tried one issue: I run the transient program without any source term (so that the whole time dependent "steady" equations get solved) until having all control-variables near to zero. Then I transfer the results. Then I load those results in the same transient program, this time with source terms. And again, the errors in the initial situation are not ok.
Is there a way to precise transfer-precision, such that an imported solution really is the same that the exported one (within the error-precision of FlexPDE) ?

2) I would like to put the two transient programs mentioned before together: I switch on the source terms via a swape-function, let's say after 1000seconds. So, what I would like to have is: big timesteps and a big TERRLIM during the first 1000sec (since there is no source term and I only want to relax the imported "slightly wrong" solutions). Then, once the source terms get switched on, I (abruptly, or via a short transition) want to continue with small time-steps.
Is there a way to do this ?

3) I do not really understand how the RMS ERROR is calculated: When starting the transient program, the solved equation for the temperature (control_tempp) is not zero at all (but something about 1e+5 (plus!!!) ). This means that I put up the equation tempp: control_tempp= 0, but it is not really solved. Nevertheless, the RMS ERROR is 1e-11 and the solving process goes on...and the value of control_tempp increases.
So, how can it be, that an equation is not really solved at all, but the RMS ERROR still is so small ? Is there a way to tell the solver that the value of control_tempp on the boundary of the preform (and inside the whole sample) is important and that it has to be "zero" (or at least 1e-8...) ?

4) Is there a way to tell the solver that the resolution is finished when all control-variables are less than a certain threshold (instead of fixing a maximal value of RMS ERROR via ERRLIM) ?

5) When reaching a temperautre of 273K, when boiling sets in, the program aborts with an error (negative pressure for example). This error is due to a time step chosen to big by FlexPDE (before the boiling sets in, there is simply heating of a liquid...so the timestep increases with each iteration). When I choose NEWTON=2 (instead of 5 or 10), then FlexPDE sees the problem and slows down the time step. On the other side, small values of NEWTON come up with worse results in space and really small timesteps (1e-15 still is not small enough) during boiling.
So I wonder if there might be a possibility to tell the solver to choose smaller timesteps (and a mesh-refinement at the point where the problem was encountered, in steady state problems) when an error occurs, instead of aborting with an error message (and one has to start in the beginning).

Thank you in advance for helping me with those error-treatments.

Kindly regards
Attachments
coupled_v3simple_time.pde
(7.91 KB) Downloaded 64 times
coupled_v3simple.pde
(9.23 KB) Downloaded 61 times
quissy
 
Posts: 7
Joined: Mon Apr 16, 2012 4:24 am

Re: Error control

Postby moderator on Thu Apr 19, 2012 3:32 pm

I think the primary problem here is that you are changing the size of the domain on the importing problem. In the initial script, you use a size of 1, but in the importing script you use 0.4. That would cause the discrepancy you see.


1) The import will respect the precision of the export. The best way to convince your self this is true would be to use IMPORTMESH and simply plot all the imported entities. Import using the exact same domain description and don't run any computation. Compare those plots to the plots of the export. They will be identical.

2) In general, the dynamic time-step control of FlexPDE will notice that something is changing and will cut the time-step. However, if you turn on a source too rapidly (or instantaneously - never a good idea) and the time-step is large, FlexPDE may "jump" over the initiation of the source. In this case you can use the CRITICAL command in the TIME section. This will tell FlexPDE to ensure that a time-step will fall at the times listed after CRITICAL. So choose a couple of times that straddle the source initiation. See CRITICAL in the Help index.

3) There is a fairly lengthy discussion in the documentation about error estimates. See "Error, Estimates" in the Help index. Short answer is that the estimate is made based on the deviation of the integral of the equation over the cells. It doesn't matter what value the variable takes on. You can have an error estimate of 1e-11 when the variable is at a value of 1e5 if 1e5 satisfies the PDE.

4) You can use HALT in the TIME section to cause FlexPDE to stop at any condition you like. See HALT in the Help index.

5) This behavior suggests that you have introduced a discontinuity. Be sure that you do not transition from liquid to vapor instantaneously. Use some reasonable transition time.
moderator
 
Posts: 307
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: No registered users and 2 guests