Skip to content

Commit

Permalink
modified default yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
akosira committed Feb 26, 2024
1 parent a07e83b commit fb61488
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions examples/snowing_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# import modules: Snowing and OperatingConditions
from ethz_snow.snowing import Snowing
from ethz_snow.operatingConditions import OperatingConditions

# define the heat transfer parameters dictionary
d = {"int": 0, "ext": 0, "s0": 50, "s_sigma_rel": 0}

# define the cooling rate profile and holding steps
c = {"rate": 0.5 / 60, "start": 20, "end": -50}
h = []

# create an instance of the operating conditions class
op = OperatingConditions(t_tot=4 * 3600, cooling=c, holding=h)


# run a single spatial simulation
S_1 = Snowing(k=d, opcond=op, Nrep=1)
S_1.run()

# show results
S_1.results

# plot evolutions of temperature and ice mass fraction
S_1.plot_evolution(what="temperature")
S_1.plot_evolution(what="ice_mass_fraction")

# get individual arrays
time = S_1.time
shelf = S_1.shelfTemp
temp = S_1.temp
ice = S_1.iceMassFraction


# multiple simulations are run if Nrep > 1
S = Snowing(k=d, opcond=op, Nrep=50)
S.run()
S.results

# plot
S.plot_cdf(what="T_nuc")
S.plot_cdf(what="t_nuc")
S.plot_cdf(what="t_sol")
S.plot_cdf(what="t_fr")
2 changes: 1 addition & 1 deletion src/ethz_snow/config/snowConfig_default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# model dimensionality/temperature resolution within vial (homogeneous, spatial_1D, spatial_2D)
dimensionality: homogeneous
dimensionality: spatial_1D

# freezing configuration to be simulated (shelf, VISF, jacket)
configuration: shelf
Expand Down

0 comments on commit fb61488

Please sign in to comment.