underworld3 icon indicating copy to clipboard operation
underworld3 copied to clipboard

Low efficiency of uw.fn.evaluate comparing with the uw.fn.evalf in swarm.advection

Open NengLu opened this issue 1 year ago • 2 comments

Here is the case1 with free surface boundary condition from Crameri2012. The swarm particle number is 256 * 64 * 9 = 147456.

In swarm advection, the uw.fn.evaif works for evaluating the velocity field while the uw.fn.evaluate doesn't.

The fn.evaluate may need to be improved.

Ex_Crameri2012Case1_testSwarmAdvection.txt

NengLu avatar Mar 07 '24 03:03 NengLu

More info please - is this about efficiency or a crash ?

lmoresi avatar Mar 07 '24 09:03 lmoresi

It's more like a crash. It stuck in swarm advection when it used the uw.fn.evaluate And it runs fine when using fn.evaif ( swarm.advection(V_fn=v.fn, delta_t=dt,evalf=True)). I have checked the velocity field, it seems all good.

NengLu avatar Mar 07 '24 11:03 NengLu

@NengLu - is this still live ? The slow-down is usually because a particle moves slightly out of bounds (it can happen). evalf is more forgiving (but less accurate). We've made a number of improvements in the advection schemes recently and I would like to know if the problem is still evident.

lmoresi avatar Aug 29 '24 12:08 lmoresi

It is fixed with the latest version of uw3. And I used too many particles in the model and ran it in serial. I am closing it.

NengLu avatar Aug 30 '24 04:08 NengLu