From b0d60d45212a8a8bf838534e21b928b844b16609 Mon Sep 17 00:00:00 2001 From: olender Date: Mon, 28 Oct 2024 13:07:51 -0300 Subject: [PATCH] small changes --- initial_guess_cpw.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/initial_guess_cpw.py b/initial_guess_cpw.py index 09f7ab9a..95312a5c 100644 --- a/initial_guess_cpw.py +++ b/initial_guess_cpw.py @@ -39,9 +39,13 @@ time_step = 2e-4 # [s] final_time = 1.0 # [s] out_freq = int(0.01/time_step) +cpw = 5 -n = 50 -mesh = fire.RectangleMesh(n, n, 0, L, originX=-L, diagonal='crossed') +c = ((lambda_out + 2*mu_out)/7850)**0.5 + +edge_length = c/(freq*cpw) +n = int(L/edge_length)+1 +mesh = fire.RectangleMesh(n, n, 0, L, originX=-L) z, x = fire.SpatialCoordinate(mesh) d = {}