Skip to content

Added Dissolving Particles - #448

Merged
jagoosw merged 13 commits into
mainfrom
jrt51/dissolving_particles
Nov 30, 2026
Merged

jagoosw merged 13 commits into
mainfrom
jrt51/dissolving_particles

Conversation

@johnryantaylor

Copy link
Copy Markdown
Collaborator

Added DissolvingParticles as a type of active particle. This module can be used to model dissolving OAE feedstock or secondary mineral precipitates.

Added DissolvingParticles as a type of active particle. This module can be used to model dissolving OAE feedstock or secondary mineral precipitates.
johnryantaylor and others added 2 commits October 18, 2026 22:08
The docs build expects generated/dissolving_particles.md, but the
Buildkite examples step uses its own hardcoded list, so the example
was never generated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread examples/dissolving_particles.jl Resolved
Comment thread src/OceanBioME.jl Resolved
Comment thread test/test_dissolving_particles.jl Resolved
Comment thread examples/dissolving_particles.jl Resolved
Comment thread examples/dissolving_particles.jl Resolved
Comment thread examples/dissolving_particles.jl Resolved
Comment thread examples/dissolving_particles.jl Resolved
Edits based on Jago's review
Adds optional required tracers upon which the sinking speed and dissolution rate can depend.  E.g. sinking might depend on the water density and dissolution might depend on the saturation state.
@johnryantaylor

Copy link
Copy Markdown
Collaborator Author

@jagoosw, I made the changes that you recommended in this review. This includes adding required_tracers so that the sinking speed and the dissolution rate can depend on model fields. Can you have a look at that part to see if it makes sense?

updating call to sugar kelp test based on upstream change.
@jagoosw

jagoosw commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

@jagoosw, I made the changes that you recommended in this review. This includes adding required_tracers so that the sinking speed and the dissolution rate can depend on model fields. Can you have a look at that part to see if it makes sense?

Sorry I was away this week, I'll look at it asap!

Comment thread examples/dissolving_particles.jl Resolved
jagoosw and others added 4 commits November 24, 2026 17:52
Remove the ParticlesWithFields wrapper. The sinking speed is computed by a
kernel in update_biogeochemical_state! and stored in the particle field
`sinking_speed`, which particle_w_velocity adds to the water velocity.

`dissolution_rate`, `sinking_speed`, and StokesSinking's `water_density` and
`dynamic_viscosity` are numbers or functions called as
f(mineral, particle_fields, tracer_fields). Sinking speeds are positive
upwards.

Rewrite the docstrings without LaTeX and the example around the defaults,
releasing the particles after the turbulence has spun up.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
fetch_output returns x, y, and z along with the particle fields, so the
dissolving particles example saves the particles directly.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Save the total scale pH computed by CarbonChemistry from DIC and alkalinity,
and show it alongside the alkalinity increase in the animation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ults

Extend the example with calcite whose dissolution rate depends on the calcite
saturation, released across a front between undersaturated and nearly
saturated water. Measure time from the release and show the particles on the
pH panel.

Run the docs page code as @example blocks and update it for the function
signatures and the sign of the sinking speed.

StokesSinking takes its default gravitational acceleration from
Oceananigans.defaults, and DissolvingMineral releases only alkalinity by
default, as calcium hydroxide does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@jagoosw

jagoosw commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

@johnryantaylor I've extended the example with a case where the dissolution depends on the saturation state and half the domain is under/over saturated. When tests run I'll merge

@jagoosw
jagoosw merged commit 15e0c0c into main Nov 30, 2026
14 checks passed
@jagoosw
jagoosw deleted the jrt51/dissolving_particles branch November 30, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants