Skip to content

Commit

Permalink
cleanup volume-to-mass refactor leftover
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo committed Jul 7, 2024
1 parent 7930553 commit c57f11b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/PySDM_examples/Arabas_et_al_2023/fig_A2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"cases = tuple({\"dt\": dt, \"N\": mlt, \"seed\": seed} for dt, mlt, seed in itertools.product(DTS, MLT, SEEDS))\n",
"\n",
"# dummy (but must-be-set) values\n",
"vol = 44 # for sign flip (ice water has negative volumes), value does not matter\n",
"mass = 44 # for sign flip (ice water has negative mass), value does not matter\n",
"d_v = 666 # products use conc., dividing there, multiplying here, value does not matter\n",
"\n",
"output = {}\n",
Expand Down Expand Up @@ -110,7 +110,7 @@
" attributes = {\n",
" \"multiplicity\": np.full(n_sd, int(case[\"N\"])),\n",
" \"immersed surface area\": np.full(n_sd, immersed_surface_area),\n",
" \"volume\": np.full(n_sd, vol),\n",
" \"water_mass\": np.full(n_sd, mass),\n",
" }\n",
" particulator = builder.build(attributes=attributes, products=products)\n",
" env[\"RH\"] = 1.0001\n",
Expand All @@ -123,7 +123,7 @@
"\n",
" ice_mass_per_volume = particulator.products[\"qi\"].get()[cell_id]\n",
" ice_mass = ice_mass_per_volume * d_v\n",
" ice_number = ice_mass / (const.rho_w * vol)\n",
" ice_number = ice_mass / mass\n",
" unfrozen_fraction = 1 - ice_number / number_of_real_droplets\n",
" output[backend_key][key][\"unfrozen_fraction\"].append(unfrozen_fraction)\n",
" \n",
Expand Down

0 comments on commit c57f11b

Please sign in to comment.