Skip to content

Commit 254f824

Browse files
committed
Minor cleanup in Nutils participants of two-scale-heat-conduction tutorial
1 parent a644a6b commit 254f824

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

two-scale-heat-conduction/macro-nutils/macro.py

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ def main():
1515
"""
1616
is_coupled_case = True # If False, single-physics problem is solved
1717

18-
# Original case from Bastidas et al.
19-
# topo, geom = mesh.rectilinear([np.linspace(0, 1.0, 9), np.linspace(0, 0.5, 5)])
2018
topo, geom = mesh.rectilinear([np.linspace(0, 1.0, 5), np.linspace(0, 0.5, 4)])
2119

2220
ns = function.Namespace(fallback_length=2)

two-scale-heat-conduction/micro-nutils/micro.py

-12
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def __init__(self, sim_id):
2020
self._sim_id = sim_id
2121

2222
# Initial parameters
23-
# self._nelems = 10 # Elements in one direction (original case from Bastidas et al.)
2423
self._nelems = 6 # Elements in one direction
2524

2625
self._ref_level = 3 # Number of levels of mesh refinement
@@ -72,17 +71,6 @@ def initialize(self):
7271
# Initialize phase field once more on refined topology
7372
solphi = self._get_analytical_phasefield(self._topo, self._ns, self._degree_phi, self._ns.lam, self._r_initial)
7473

75-
target_porosity = 1 - math.pi * self._r_initial ** 2
76-
print("Target amount of void space = {}".format(target_porosity))
77-
78-
# Solve Allen-Cahn equation till we reach target porosity value
79-
# dt_initial = 1E-3
80-
# psi = 0
81-
# while psi < target_porosity:
82-
# print("Solving Allen-Cahn equation to achieve initial target grain structure")
83-
# solphi = self._solve_allen_cahn(self._topo, solphi, 0.5, dt_initial)
84-
# psi = self._get_avg_porosity(self._topo, solphi)
85-
8674
self._solphi = solphi # Save solution of phi
8775
psi = self._get_avg_porosity(self._topo, solphi)
8876
self._psi_nm1 = psi # Average porosity value of last time step

0 commit comments

Comments
 (0)