Multidomain mesh not shown in mesh tools
-
I am following the tutorial "3.2.3 Two Metallic Spheres - Unstructured" of the Sim4Life light and when I reach to the point of creating the unstructured mesh by selecting the surface meshes I select all the surface meshes and I do not see any selection like Multidomain Mesh in the mesh tools. Is this not possible in Sim4Life?
Thank you!
-
I am following the tutorial "3.2.3 Two Metallic Spheres - Unstructured" of the Sim4Life light and when I reach to the point of creating the unstructured mesh by selecting the surface meshes I select all the surface meshes and I do not see any selection like Multidomain Mesh in the mesh tools. Is this not possible in Sim4Life?
Thank you!
The problem is solved by executing the following code:
import s4l_v1.document as document import s4l_v1.simulation.emlf as emlf import XCoreModeling as xcm # Create the unstructured mesh global_opt = xcm.GlobalUnstructuredMeshingOptions() # Create the multidomain mesh global_opt.RemeshSurfaces = False entities = s4l.model.AllEntities()['Meshes'].Entities remesh_opt = xcm.MeshingOptions() remesh_opt.EdgeLength = .25 xcm.RemeshTriangleMesh(entities[0], remesh_opt) xcm.RemeshTriangleMesh(entities[1], remesh_opt) xcm.RemeshTriangleMesh(entities[2], remesh_opt) local_opt_dict={} for ent in entities: local_opt = xcm.LocalUnstructuredMeshingOptions() print(ent, ent.Name) if 'Sphere 1' in ent.Name : local_opt.Priority = 10 elif 'Sphere 2' in ent.Name : local_opt.Priority = 10 elif 'Air' in ent.Name : local_opt.Priority = 1 local_opt_dict[ent] = local_opt print(local_opt.Priority) mesh = xcm.GenerateUnstructuredMesh(entities, global_opt, local_opt_dict) # Add the unstructured simulation sim = emlf.UnstructuredElectroQsOhmicSimulation() sim.AddUnstructuredMesh(mesh) sim.Name = "Unstructured LF" document.AllSimulations.Add(sim)After the code execution is finished there will be an unstructured mesh and an EM LF Unstructured simulation too. Modify the code to suit your needs. Still this does not solve the problem of the Multidomain tool not appearing.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login