Hello everyone,
Jonathan, I think I have found a way to do what I want to do. I tested
it and it works. It probably falls into the "ugly hack" category, but I
like it because it's really simple and seems to work fine.
So, what I do is I include the line of code where I define the equation
inside the solution loop along with my self-made and very basic
Runge-Kutta-Fehlberg ODE solver. Which results in something like:
while res > tolRes:
grad = (temp.getHarmonicFaceValue()[-1] -
temp.getHarmonicFaceValue()[-2]) / dx
dSdt = intRecRate(elapsed, Snew, grad)
eq = TransientTerm()
== ImplicitDiffusionTerm(coeff=K/(c*rho*Snew**2)) \
- ExponentialConvectionTerm(xi/Snew * dSdt) \
- temp / Snew * dSdt
res = eq.sweep(var=temp,
boundaryConditions=BCs,
dt=dt,
solver=solver)
grad = (temp.getHarmonicFaceValue()[-1]
- temp.getHarmonicFaceValue()[-2]) / dx
resODE = RKF45(lambda t, S: intRecRate(t, S, grad), 0, S, dt)
This probably won't beat any records of speed, but I'm not after that
for the moment.
Also, the use of french in your answers leads me to believe 2 things.
First, you probably guessed my francophone background from my name
(sadly, maybe also my non-native english). That is very clever! Second,
I like to think that you want to learn some french. I would like to
support this endeavour by correcting a tiny little mistake. The word
"dommage" is masculin. Therefore we say "Quel dommage!"
Meilleures salutations!
definition of the eu
On Jul 20, 2008, at 7:35 AM, Etienne Rivard wrote:
Right. I remember once considering swithcing to another method like
the phase field method to solve my problem. But I have to admit I was
somewhat demotivated by the apparent complexity of the method. For the
moment, I don't think I'll get deeper into that.
chacun à son goût
Thanks for the offer, I appreciate it but. I have time to work on this
and this actually a part of my PhD work so I need to show a deep
understanding of everything I use, so I would rather shoot for a more
elegant solution.
Understood. When you get it done, if you wanted to contribute said
elegant solution to FiPy, we'd be delighted.