Skip to content

Commit

Permalink
add 10 layer sim
Browse files Browse the repository at this point in the history
  • Loading branch information
aradermacher committed Sep 19, 2023
1 parent 1435968 commit 47dabb4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions usecases/TrussArc/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def create_body_force(self, v: ufl.argument.Argument) -> ufl.form.Form:
"""

force_vector = np.zeros(self.p["dim"])
force_vector[-1] = -self.p["rho"] * self.p["g"] # works for 2D and 3D
force_vector[1] = -self.p["rho"] * self.p["g"] # for 3D case where y is the height direction!!

f = df.fem.Constant(self.mesh, ScalarType(force_vector))
L = ufl.dot(f, v) * ufl.dx
Expand Down Expand Up @@ -453,7 +453,9 @@ def run_amprocess(param: dict[str, pint.Quantity]):


if __name__ == "__main__":
mesh_name = 'MeLT10_0-T50_0-H50_0-230912094114'
mesh_name, num_L = 'MeLT10_0-T50_0-H50_0-230912094114', 5
# mesh_name, num_L = 'MeLT10_0-T50_0-H100_0-230912091426', 10

xdmf_path_truss = pathlib.Path(__file__).parent / 'output' / mesh_name.split('-')[-1] / 'mesh_file' / f"{mesh_name}.xdmf"
# need to change grid name in xdmf file to 'Grid' from 'hash'

Expand All @@ -467,7 +469,7 @@ def run_amprocess(param: dict[str, pint.Quantity]):
# xdmf_path = xdmf_path_geotest
# a=10
xdmf_path = xdmf_path_truss
a=5
a=num_L

###!!! MESH in mm definiert aber wir rechnen mit m das geht nicht korrekt!!

Expand Down Expand Up @@ -505,12 +507,12 @@ def run_amprocess(param: dict[str, pint.Quantity]):
'layer_height': 10 * ureg("mm"), # to activate layer by layer
'num_layers': a * ureg(""), # 5 in truss example 10 in geo test for activation
'layer_thickness': 50 * ureg("mm"), # for computing path length and with velocity time for one layer
'print_velocity': 900 * ureg("mm/s"),
'print_velocity': 207 * ureg("mm/s"), # to get approx 40s /Layer
'num_time_steps_per_layer': 2 * ureg(""),
}

run_amstructure({**params,**params_finished})
#run_amprocess({**params,**params_process})
# run_amprocess({**params,**params_process})



Expand Down

0 comments on commit 47dabb4

Please sign in to comment.