Skip to content
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Simulations & Solvers
  4. Multidomain mesh not shown in mesh tools

Multidomain mesh not shown in mesh tools

Scheduled Pinned Locked Moved Simulations & Solvers
3 Posts 2 Posters 491 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dstoupis
    wrote on last edited by dstoupis
    #1

    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!

    D 1 Reply Last reply
    0
    • D dstoupis

      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!

      D Offline
      D Offline
      dstoupis
      wrote on last edited by dstoupis
      #2

      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.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Cosimo
        ZMT
        wrote on last edited by
        #3

        The multidomain mesh is currently not available for Sim4Life light, that's why the relevant button does not appear in the ribbon.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Search