CliMA / Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
https://clima.github.io/OceananigansDocumentation/stable
MIT License
925 stars 188 forks source link

`buoyancy.model` -> `buoyancy.formulation`? #3317

Open glwagner opened 9 months ago

glwagner commented 9 months ago

It's bothered me for a long time that the key property of buoyancy is called model:

https://github.com/CliMA/Oceananigans.jl/blob/5dd96cf310e988fc5d3a2523c2dcc7197f18ff62/src/BuoyancyModels/buoyancy.jl#L3-L6

which leads to funny lines like

equation_of_state = model.buoyancy.model.equation_of_state # <<roll eyes>>

Can we change model to formulation? Then we'd write

equation_of_state = model.buoyancy.formulation.equation_of_state # hm...

It's slightly better. Open to other suggestions too. We just have to get rid of model.

We can also change the module name to Buoyancies or something.

cc @tomchor

glwagner commented 9 months ago

Also how about changing the name of the struct from buoyancy to BuoyancyForce? That motivates the addition of the direction of the force (eg through gravity unit vector). Then the "formulation" refers to the scalar value of the buoyancy.