On Thu, Aug 11, 2011 at 9:56 AM, JAMBON Fanny 213198
<[email protected]> wrote:
>
> First of all I'm trying to simulate pure fickian diffusion through the plate; 
> but though I've read and read again the documentation, I still haven't 
> understood how the "real time during which the equation must be solved" has 
> to be given to the solver, or put in the program.

You seem to have figured it out in your script. Just passing a "dt"
argument to solve is all it takes.

> The program I've written (end of this e-mail), is similar to the first mesh1D 
> example of the documentation, but when comparing the hydrogen profile to the 
> erfc solution, great discrepancies arise.
> It's as though the solver time went faster than the analytical solution time, 
> since the solver has already attained the steady state when the hydrogen 
> penetration is just at its beginning according the analytical solution.

Can you post the entire example so it runs. It's missing imports and
the like. Thanks.

> So, my question is: how should the "real time" duration be given to the 
> solver and/or the program?

It seems like it should be correct

> - is "duration" equal to the number of iterations calling the 'eq.solve(...)' 
> times the 'dt' given to the solver, which is what I understood from the 
> documentation (as in the example mesh1D: t=Steps*TimeStepDuration, at least 
> for explicit method); and in that case, where is my mistake ?

You have the right idea. Make sure you initialize the time variables
with a float rather than an integer, but I don't think that should be
a problem

> - or is it something else, and in that case, could someone please put me on 
> the right track?

Post the entire script so that it runs and I'll try and figure it out.

-- 
Daniel Wheeler


Reply via email to