• 0 Votes
    3 Posts
    36 Views

    Thank you so much for hour help with the technical issue!
    Your assistance made a big difference, and I truly appreciate your expertise and prompt support!

  • 0 Votes
    1 Posts
    87 Views
    No one has replied
  • 0 Votes
    3 Posts
    128 Views

    Dear Arjama,

    Thanks a lot for your reply and for your very detailed example. The problem I was referring to is in the line where you add TIMAM to the mask.
    If I run:
    inputs = [TIMAM]
    field_masking_filter = analysis.core.FieldMaskingFilter(inputs=inputs)

    where TIMAM = modulation_envelope(e_field_1, e_field_2, dir_vector=None)

    I get the error:
    field_masking_filter = analysis.core.FieldMaskingFilter(inputs=[TImax])
    File "C:\Program Files\Sim4Life_8.0.0.15165\Python\lib\site-packages\s4l_v1_api\analysiswrappers.py", line 231, in init
    self.Inputs[id].Connect(input)
    File "C:\Program Files\Sim4Life_8.0.0.15165\Python\lib\site-packages\s4l_v1_api\analysiswrappers.py", line 647, in Connect
    raise Exception("Can't connect ports")
    Exception: Can't connect ports

    So I think my problem is the creation of TIMAM. I Imagine it is not the TI envelope, but rather the TI Envelope inside some data structure that can be connected to the masking filter?

    Thanks again!

  • 0 Votes
    2 Posts
    227 Views

    Hi,
    You could do it with the optimizer/scripting.
    Option (1)
    For 2 electrode pairs you can create LF multiport simulation (see LF tutorial). In the post-pro you will update the Amp/Phase of the electrodes and use the simulation combiner to extract the TI MAM.
    Once you run the simulation once, select the simulation and click on optimize. Switch to the Analysis tab to check if this pipeline is created, click on switch to Expert Mode. Now to include design variables which in your case is the position of the electrode switch to “Model” tab and click on the electrodes, in the controller select “Show Expression” and “Create Expression” . Then switch to Analysis tab and create a pipeline that will look like the following:

    Sim4Life_szrHUU8P6P.png

    Option (2)
    If you are required to do this, please let me know, I can send you an example script to create a similar pipeline.

    If you require further help with creating either of these, please email s4l-support@zmt.swiss.

    Thanks,
    Arjama

  • 0 Votes
    4 Posts
    161 Views

    It looks like this is a bug. Until it is fixed, you can still add line sensors to LF simulations using the API.

    Here is a quick example that adds an entity named 'Lines 1' as a voltage sensor:

    # -*- coding: utf-8 -*- import numpy import s4l_v1.document as document import s4l_v1.materials.database as database import s4l_v1.model as model import s4l_v1.simulation.emlf as emlf import s4l_v1.units as units from s4l_v1 import ReleaseVersion from s4l_v1 import Unit # Define the version to use for default values ReleaseVersion.set_active(ReleaseVersion.version8_0) # Creating the simulation simulation = emlf.ElectroQsOhmicSimulation() # Mapping the components and entities component__plane_x = simulation.AllComponents["Plane X+"] component__plane_x_1 = simulation.AllComponents["Plane X-"] component__background = simulation.AllComponents["Background"] component__plane_y = simulation.AllComponents["Plane Y+"] component__plane_y_1 = simulation.AllComponents["Plane Y-"] component__plane_z = simulation.AllComponents["Plane Z+"] component__plane_z_1 = simulation.AllComponents["Plane Z-"] component__overall_field = simulation.AllComponents["Overall Field"] entity__line = model.AllEntities()["Lines 1"] # Adding a new VoltageSensorSettings voltage_sensor_settings = emlf.VoltageSensorSettings() components = [entity__line] simulation.Add(voltage_sensor_settings, components) # Editing AutomaticGridSettings "Automatic automatic_grid_settings = [x for x in simulation.AllSettings if isinstance(x, emlf.AutomaticGridSettings) and x.Name == "Automatic"][0] components = [entity__line] simulation.Add(automatic_grid_settings, components) # Editing AutomaticVoxelerSettings "Automatic Voxeler Settings automatic_voxeler_settings = [x for x in simulation.AllSettings if isinstance(x, emlf.AutomaticVoxelerSettings) and x.Name == "Automatic Voxeler Settings"][0] components = [entity__line] simulation.Add(automatic_voxeler_settings, components) # Update the materials with the new frequency parameters simulation.UpdateAllMaterials() # Update the grid with the new parameters simulation.UpdateGrid() # Add the simulation to the UI document.AllSimulations.Add( simulation )
  • 0 Votes
    3 Posts
    143 Views

    @halder Hi Arjama, thanks for your reply! I will send you an email!

  • 0 Votes
    3 Posts
    124 Views

    Thanks for your reply. actually i have solved the problem. the problem was that inspite of what the documentation said, I have been selected the wrong study (ohmic quasi stat) under the unstructured EM LF Electro, while i needed to select the EM LF Electro, which could be exert on the structured problems.

  • 0 Votes
    3 Posts
    232 Views

    You could also delete all of the model entities by filtering by type. Visible geometry objects have type 'body', so you could do:

    import s4l_v1.model as model entities_to_delete = [e for e in model.AllEntities() if e.Type == 'body'] for e in entities_to_delete: e.Delete()
  • 0 Votes
    3 Posts
    377 Views

    To follow up on this problem just in case other people encounter similar issues, I found out that in my case this error was caused by cropping the region of interest out of the anatomical model.
    I cropped the Jeduk static surfaces with Planar cut as well as the nerve trajectories to preserve only the torso/chest region. As a result, from some nerve trajectories that extend beyond the region of interest and loop back into the region, multiple wires resulted from the cropping. The discontinuity in these splines caused issues in discretization which showed up in the console as a "Failed to interpolate extracellular fields onto neurons" error for me.
    This problem was solved by iterating through all the remaining nerve trajectories after cropping and checking using xcm.GetWires() how many wire bodies are contained in each trajectory. If there is more than one, the wire body with the max length is cloned and given the same name as the original trajectory and the problematic trajectory was deleted.

  • 0 Votes
    1 Posts
    88 Views
    No one has replied
  • 0 Votes
    4 Posts
    443 Views

    Hey there!
    That's a pretty powerful setup with dual GPUs! To run two simulations at the same time, you can utilize parallel computing techniques to distribute the workload across both GPUs. Since you already know how to designate GPUs for each simulation, you might want to explore frameworks like CUDA or OpenMP, which are excellent for managing parallel tasks. Ensure that your simulation software is configured to support multi-GPU operations and check its documentation for any specific settings related to concurrent simulations. Sometimes, fine-tuning the job scheduling can also help in managing simultaneous tasks more effectively.
    On another note, if you're interested in staying ahead with technology, check out Quantum AI. They delve into the fascinating world of quantum computing, which has the potential to transform simulation and problem-solving in groundbreaking ways. Best of luck with your simulations!

  • 0 Votes
    2 Posts
    218 Views

    It depends on what you mean by transmitting and receiving. If the port outputs of the antenna look like 50 ohms in both transmit and receive then the usual multiport simulation will work just fine. Then you just need to go into each port, say "port extract" then go to overall field, then extract that ports E field. This E field will be what is generated from exciting port n and "receiving" on all other antenna. Do this 8 times for all 8 ports and this should be what you want

  • 0 Votes
    1 Posts
    115 Views
    No one has replied
  • Impedance of tissue

    Unsolved Simulations & Solvers
    1
    0 Votes
    1 Posts
    127 Views
    No one has replied
  • Poser API documentation?

    Anatomical Models
    3
    0 Votes
    3 Posts
    192 Views

    Thank you for the detailed answer!

  • 0 Votes
    4 Posts
    277 Views

    These error messages can be safely ignored, but I will pass them along to see if such overzealous and misleading error messages can be suppressed in the future.

  • Max modulation tool in API

    Python API
    2
    0 Votes
    2 Posts
    246 Views

    Would like to know too in 2024 🙂

  • 0 Votes
    1 Posts
    98 Views
    No one has replied
  • 0 Votes
    5 Posts
    254 Views

    @brown
    Thank you, I will check these things. Additionally, there are some warning messages which may help:
    7427af6d-b388-4d9a-b629-2678e1872293-image.png
    Is the mesh division not precise enough?

  • Cannot open .smash project file

    Sim4Life
    3
    0 Votes
    3 Posts
    156 Views

    Thank you so much you are a godsend 🙏 You saved me a couple days worth of work!