Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify water freezing regression test #73

Merged
merged 3 commits into from Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@ is an engine for constructing PDE-based simulations
discretized in space with mixed finite elements
and in time with finite differences.

![](https://travis-ci.org/geo-fluid-dynamics/sapphire.svg?branch=master)
[![Build Status](https://travis-ci.org/geo-fluid-dynamics/sapphire.svg?branch=master)](https://travis-ci.org/geo-fluid-dynamics/sapphire)
[![DOI](https://zenodo.org/badge/157389237.svg)](https://zenodo.org/badge/latestdoi/157389237)


Expand Down
24 changes: 3 additions & 21 deletions tests/model_validation/test__convection_coupled_phasechange.py
Expand Up @@ -75,24 +75,6 @@ def test__validate__melt_octadecane__regression():

def freeze_water(endtime, s, tau, rx, nx, rt, nt, q, outdir = ""):

mu_l__SI = 8.90e-4 # [Pa s]

rho_l__SI = 999.84 # [kg / m^3]

nu_l__SI = mu_l__SI/rho_l__SI # [m^2 / s]

t_f__SI = endtime # [s]

L__SI = 0.038 # [m]

Tau = pow(L__SI, 2)/nu_l__SI

t_f = t_f__SI/Tau

""" For Kowalewski's water freezing experiment,
at t_f__SI 2340 s, t_f = 1.44.
"""

sim = sapphire.benchmarks.freeze_water_in_cavity.Simulation(
quadrature_degree = q,
element_degree = rx - 1,
Expand All @@ -104,15 +86,15 @@ def freeze_water(endtime, s, tau, rx, nx, rt, nt, q, outdir = ""):
+ "rx{0}_nx{1}_rt{2}_nt{3}/".format(rx, nx, rt, nt)
+ "q{0}/".format(q))))

sim.timestep_size = sim.timestep_size.assign(t_f/float(nt))
sim.timestep_size = sim.timestep_size.assign(endtime/float(nt))

sim.solid_velocity_relaxation_factor = \
sim.solid_velocity_relaxation_factor.assign(tau)

sim.smoothing = sim.smoothing.assign(s)


sim.solutions, _, = sim.run(endtime = t_f)
sim.solutions, _, = sim.run(endtime = endtime)


print("Liquid area = {0}".format(sim.liquid_area))
Expand All @@ -124,7 +106,7 @@ def test__validate__freeze_water__regression(datadir):

sim = freeze_water(
outdir = datadir,
endtime = 2340.,
endtime = 1.44,
s = 1./200.,
tau = 1.e-12,
rx = 2,
Expand Down