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!

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)

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	

mesh = xcm.GenerateUnstructuredMesh(entities, global_opt, local_opt_dict)

# Add the unstructured simulation
sim = emlf.UnstructuredElectroQsOhmicSimulation()
sim.Name = "Unstructured LF"


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.

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

Log in to reply