From 47dabb4de92983b384011d3254a4a6c0809940b6 Mon Sep 17 00:00:00 2001 From: aradermacher Date: Tue, 19 Sep 2023 12:59:05 +0200 Subject: [PATCH] add 10 layer sim --- usecases/TrussArc/simulation.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usecases/TrussArc/simulation.py b/usecases/TrussArc/simulation.py index fa49dbb..cbe8f0a 100644 --- a/usecases/TrussArc/simulation.py +++ b/usecases/TrussArc/simulation.py @@ -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 @@ -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' @@ -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!! @@ -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})