Jonathan, Thank you for your help.
I have a few more questions:
1)
I want for the H(\alpha, t) function to be automatically updated as
the Variable t changes. But I have a problem: The value of H is
defined piecewise, meaning that I have a treshold \epsilon. Depending
on whether \alpha <= \epsilon or the value of H is calculated
differently. How do I implement this? I tried something like:
H[0:10] = h1(\alpha, t)
H[10:] = h2(\alpha, t)
But in this case H is not being updated... Any ideas?
2)
Is it possible that sweeps don't change the value of my variable at
all? I have the following code:
phi = CellVariable(name="Probability for angle", mesh=mesh, rank=0, hasOld=1)
for step in range(steps):
phi.updateOld()
for sweep in range(sweeps):
eq.sweep(var=phi, boundaryConditions=BCs, dt=timeStepDuration)
#normalize
sum = (phi.getValue() * dAlpha).sum()
phi.setValue(phi.getValue() / sum)
....
With this I get exactly the same result as when I directly use solve.
Am I doing something wrong? Is the normalization done in the right
way?
I think thats it for now :)
Cheers,
Matej
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]