Hi, Bernd
when I run a diffusional transformation simulation, I find that MICRESS could keep the mass balance accurately during the whole simulation.
But in my own codes, I found that the mass balance cannot be kept exactly, there is always accumulated error (maybe quite small every iteration) and the error is significant after thousands of calculation steps. The solution i've found is to use double precision which could keep the error in a acceptable range. What's your comment on this? Thank you.
Ben
mass blance
Re: mass blance
Hi zhubq,
for exactly this reason, we are using double precision (R8) in MICRESS for the diffusion solver, even if the memory usage is higher!
We found the strongest problems when using the 1d extension of the concentration field with long-range diffusion profiles.
Of course, one can try to reduce problems by "intelligent" programming, like to avoid calculating differences beween variables with values of different orders of magnitude, or not calculating twice the same fluxes between neighbour cells but store them instead. But you never can be sure, so I would advice you to use R8!
Bernd
for exactly this reason, we are using double precision (R8) in MICRESS for the diffusion solver, even if the memory usage is higher!
We found the strongest problems when using the 1d extension of the concentration field with long-range diffusion profiles.
Of course, one can try to reduce problems by "intelligent" programming, like to avoid calculating differences beween variables with values of different orders of magnitude, or not calculating twice the same fluxes between neighbour cells but store them instead. But you never can be sure, so I would advice you to use R8!
Bernd
Re: mass blance
Thanks, Bernd!Bernd wrote:Hi zhubq,
for exactly this reason, we are using double precision (R8) in MICRESS for the diffusion solver, even if the memory usage is higher!
We found the strongest problems when using the 1d extension of the concentration field with long-range diffusion profiles.
Of course, one can try to reduce problems by "intelligent" programming, like to avoid calculating differences beween variables with values of different orders of magnitude, or not calculating twice the same fluxes between neighbour cells but store them instead. But you never can be sure, so I would advice you to use R8!
Bernd
It seems using R8 is the best way.