diff --git a/Code/Source/solver/ComMod.h b/Code/Source/solver/ComMod.h index c8d800cdd..5a9de882d 100644 --- a/Code/Source/solver/ComMod.h +++ b/Code/Source/solver/ComMod.h @@ -1456,10 +1456,10 @@ class urisType Array Yd; // Default signed distance value away from the valve. - double sdf_default = 10.0; + double sdf_default = 1000.0; // Default distance value of the valve boundary (valve thickness). - double sdf_deps = 0.04; + double sdf_deps = 0.25; // Default distance value of the valve boundary when the valve is closed. double sdf_deps_close = 0.25; diff --git a/Code/Source/solver/uris.cpp b/Code/Source/solver/uris.cpp index 055a0c110..cadbb34f6 100644 --- a/Code/Source/solver/uris.cpp +++ b/Code/Source/solver/uris.cpp @@ -518,8 +518,9 @@ void uris_read_msh(Simulation* simulation) { } file_stream.close(); - uris_obj.sdf_deps = param->thickness(); - uris_obj.sdf_deps_close = param->close_thickness(); + uris_obj.sdf_default = uris_obj.sdf_default * uris_obj.scF; + uris_obj.sdf_deps = param->thickness() * uris_obj.scF; + uris_obj.sdf_deps_close = param->close_thickness() * uris_obj.scF; uris_obj.clsFlg = param->valve_starts_as_closed(); // uris_obj.tnNo = 0; @@ -779,7 +780,8 @@ void uris_write_vtus(ComMod& com_mod) { for (int a = 0; a < mesh.nNo; a++) { int Ac = mesh.gN(a); for (int i = 0; i < nsd; i++) { - d[iM].x(i,a) = uris_obj.x(i,Ac); + // Scale the valve displacement to the unit of the mesh + d[iM].x(i,a) = uris_obj.x(i,Ac) / uris_obj.scF; } } for (int e = 0; e < mesh.nEl; e++) { @@ -802,7 +804,7 @@ void uris_write_vtus(ComMod& com_mod) { for (int a = 0; a < mesh.nNo; a++) { int Ac = mesh.gN(a); for (int i = 0; i < nsd; i++) { - d[iM].x(is+i,a) = uris_obj.Yd(s+i,Ac); // [HZ] Need to check this + d[iM].x(is+i,a) = uris_obj.Yd(s+i,Ac) / uris_obj.scF; // [HZ] Need to check this } }