Skip to content

Commit f359857

Browse files
committed
rm ciover, cfover, advth extra rprof
Those are only relevant for very specific problems and therefore should be in user scripts rather than directly exposed in StagPy.
1 parent 144070f commit f359857

File tree

2 files changed

+0
-85
lines changed

2 files changed

+0
-85
lines changed

src/stagpy/phyvars.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,6 @@
277277
"advds": processing.advds_prof,
278278
"advas": processing.advas_prof,
279279
"energy": processing.energy_prof,
280-
"ciover": processing.init_c_overturn,
281-
"cfover": processing.c_overturned,
282-
"advth": processing.advth,
283280
}
284281
)
285282
"""Radial profiles that StagPy can compute."""

src/stagpy/processing.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -240,88 +240,6 @@ def energy_prof(step: Step) -> Rprof:
240240
)
241241

242242

243-
def advth(step: Step) -> Rprof:
244-
"""Compute theoretical advection.
245-
246-
This compute the theoretical profile of total advection as function of
247-
radius.
248-
249-
Args:
250-
step: a `Step` of a `StagyyData` instance.
251-
252-
Returns:
253-
the theoretical advection and radius.
254-
"""
255-
rbot, rtop = step.rprofs.bounds
256-
rmean = 0.5 * (rbot + rtop)
257-
rad = step.rprofs.centers
258-
radio = step.timeinfo["H_int"]
259-
if rbot != 0: # spherical
260-
th_adv = -(rtop**3 - rad**3) / rmean**2 / 3
261-
else:
262-
th_adv = rad - rtop
263-
th_adv *= radio
264-
th_adv += step.timeinfo["Nutop"]
265-
return Rprof(th_adv, rad, Varr("Theoretical advection", "Heat flux", "W/m2"))
266-
267-
268-
def init_c_overturn(step: Step) -> Rprof:
269-
"""Compute concentration before overturn.
270-
271-
This compute the resulting composition profile if fractional
272-
crystallization of a SMO is assumed.
273-
274-
Args:
275-
step: a `Step` of a `StagyyData` instance.
276-
277-
Returns:
278-
the composition and radius.
279-
"""
280-
rbot, rtop = step.rprofs.bounds
281-
par = step.sdat.par
282-
xieut = par.nml["tracersin"]["fe_eut"]
283-
k_fe = par.nml["tracersin"]["k_fe"]
284-
xi0l = par.nml["tracersin"]["fe_cont"]
285-
xi0s = k_fe * xi0l
286-
xired = xi0l / xieut
287-
rsup = (rtop**3 - xired ** (1 / (1 - k_fe)) * (rtop**3 - rbot**3)) ** (1 / 3)
288-
289-
def initprof(rpos: float) -> float:
290-
"""Theoretical initial profile."""
291-
if rpos < rsup:
292-
return xi0s * ((rtop**3 - rbot**3) / (rtop**3 - rpos**3)) ** (1 - k_fe)
293-
return xieut
294-
295-
rad = np.linspace(rbot, rtop, 500)
296-
initprof_vec = np.vectorize(initprof)
297-
return Rprof(
298-
initprof_vec(rad),
299-
rad,
300-
Varr("Concentration before overturn", "Concentration", "1"),
301-
)
302-
303-
304-
def c_overturned(step: Step) -> Rprof:
305-
"""Compute theoretical overturned concentration.
306-
307-
This compute the resulting composition profile if fractional
308-
crystallization of a SMO is assumed and then a purely radial
309-
overturn happens.
310-
311-
Args:
312-
step: a `Step` of a `StagyyData` instance.
313-
314-
Returns:
315-
the composition and radius.
316-
"""
317-
rbot, rtop = step.rprofs.bounds
318-
cinit = init_c_overturn(step)
319-
radf = (rtop**3 + rbot**3 - cinit.rad**3) ** (1 / 3)
320-
return Rprof(
321-
cinit.values, radf, Varr("Overturned concentration", "Concentration", "1")
322-
)
323-
324-
325243
def stream_function(step: Step) -> Field:
326244
"""Compute the stream function in 2D geometry.
327245

0 commit comments

Comments
 (0)