ludwig-cf / ludwig

A lattice Boltzmann code for complex fluids
https://ludwig.epcc.ed.ac.uk
Other
54 stars 35 forks source link

Ellipsoids #255

Closed kevinstratford closed 9 months ago

kevinstratford commented 1 year ago

To do:

Will not address at this time:

kevinstratford commented 1 year ago

We also need to be able to translate the type in older file inputs to the new regime,

enum colloid_type_enum {COLLOID_TYPE_DEFAULT = 0,
                        COLLOID_TYPE_ACTIVE,
                        COLLOID_TYPE_SUBGRID,
                        COLLOID_TYPE_JANUS};

These values would be translated to defaults, i.e.,

DEFAULT => bbl, sphere
ACTIVE  => bbl, sphere, active
SUBGRID => subgrid, sphere
JANUS   => use new attribute as required

So, the potential problem is that in reading an old input file, the code from v0.21.0 would ignore the type entry, but also find the new shape entry to be COLLOID_SHAPE_INVALID. An answer to make the assumption that we will fall back to inspect the type entry, and set the new shape etc parameters as suggested above. An appropriate warning should be issued if possible.

kevinstratford commented 1 year ago

The surface energy computation (specifically colloids_q_boundary_normal() has been updated to handle the ellipsoid normal. The (discrete) surface area computation should also remain valid.

There is not a large difference (few parts in 1000) in the tests observed in the surface energy.

kevinstratford commented 9 months ago

I've put this out in 0.21.0. It is not impossible that some errors persist, so more testing is required. Oblate objects also need attention.