Skip to content
  • 0 Votes
    3 Posts
    730 Views
    P
    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!
  • Cannot place line as a voltage sensor

    Simulations & Solvers
    4
    0 Votes
    4 Posts
    869 Views
    B
    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 )
  • Normalizing to partial-body SAR

    Analysis & Postprocessing
    3
    0 Votes
    3 Posts
    789 Views
    MathijsKikkenM
    @halder Hi Arjama, thanks for your reply! I will send you an email!
  • 0 Votes
    3 Posts
    893 Views
    N
    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.
  • Extrude 2D image as mesh or solid

    CAD Modeling
    1
    0 Votes
    1 Posts
    371 Views
    No one has replied
  • run two simulations on the same computer

    Simulations & Solvers
    4
    0 Votes
    4 Posts
    1k Views
    M
    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!
  • Export E-field due to each antenna

    Analysis & Postprocessing
    2
    0 Votes
    2 Posts
    708 Views
    T
    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
  • Calculate Divergence of B field

    Analysis & Postprocessing
    1
    0 Votes
    1 Posts
    384 Views
    No one has replied
  • Impedance of tissue

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

    Anatomical Models
    3
    0 Votes
    3 Posts
    839 Views
    S
    Thank you for the detailed answer!
  • Error information in the console.

    Installation & Licensing
    4
    0 Votes
    4 Posts
    1k Views
    B
    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
    685 Views
    J
    Would like to know too in 2024 :)
  • 1 Votes
    5 Posts
    968 Views
    H
    @brown Thank you, I will check these things. Additionally, there are some warning messages which may help: [image: 1714906840653-7427af6d-b388-4d9a-b629-2678e1872293-image-resized.png] Is the mesh division not precise enough?
  • Cannot open .smash project file

    Sim4Life
    3
    0 Votes
    3 Posts
    710 Views
    J
    Thank you so much you are a godsend 🙏 You saved me a couple days worth of work!
  • Running iSolve on GPU

    Simulations & Solvers
    4
    0 Votes
    4 Posts
    780 Views
    B
    You definitely have enough memory here. It's likely that the solver could not use the device for some other reason. Can you try updating your graphics drivers?
  • 0 Votes
    4 Posts
    824 Views
    H
    In terms of the material settings in the thermal simulation: The heat transfer rate defines whether heat removal by perfusion should be considered. In the absence of this term, heat is only removed by thermal conduction (diffusion) and boundary conditions. The options provided for heat transfer rate affect whether perfusion is constant or affected by local thermoregulation (temperature (T) dependent perfusion, e.g., to account for vasodilation). As for the heat transfer rate, the heat generation rate term can be constant or affected by local thermoregulation (T dependent, reflecting increased metabolic activity with increasing temperature). It is also possible to introduce time-dependent heat generation, e.g., to model a heating battery. Baseline perfusion values (incl. variability information) are available in the IT'IS database and can be automatically assigned from sim4life: (http://www.itis.ethz.ch/virtual-population/tissue-properties/database/database-summary/). If non-constant perfusion should be applied or not depends on the tissue and temperature increase magnitude (e.g., muscle above 39 starts to have a strong perfusion increase). The conservativeness of a perfusion model choice is application-dependent. To simulate the heating effect of tissues over time, blood perfusion and heat generation rate (metabolic heat generation) of the tissue would also need to be considered. The perfusion is covered in the option "Heat Transfer Rate". All options that you can enter here are related to heat-transfer based removal of energy from the system. Perfusion can be adjusted by changing the type of hear transfer (None, Constant, Linear (T), Piecewise Linear (T). The constant term assumes constant perfusion, independent of tissue temperature. It is the default assigned when using the IT'IS tissue database in Sim4Life. Linear (T) or Piecewise Linear (T) assume temperature dependent perfusion. You can add your your transition temperatures using the little "+" icon. Please note that the linear coefficients represent the slope of the linear perfusion. Each transition temperature indicates the change of the perfusion rate.
  • [Error] Input field array is empty

    Analysis & Postprocessing
    4
    0 Votes
    4 Posts
    794 Views
    J
    Wow I can't believe I missed that. Thank you so much! The warning definitely threw me off
  • Fields data extraction after MQS simulation

    Simulations & Solvers
    3
    0 Votes
    3 Posts
    604 Views
    L
    Thanks for your reply
  • Grid Setting

    Simulations & Solvers
    3
    0 Votes
    3 Posts
    642 Views
    brynB
    I think you can change how the steps change between gridlines with the grading option. If you have some entities that should not influence the grid set priority to zero (for those entities). Then choose the largest grid step you want for the global settings and and the smallest (0.5mm) for the arrays_grid. You should manage to control how the grid changes away from the arrays_grid.
  • 0 Votes
    2 Posts
    443 Views
    H
    When using a long line as "normal" edge source, the discretization will result in one edge being the actual source and rest of the line being discretized as PEC filament. This can lead (depending on the excitation frequency, the length of the source line and the setup) to inaccuracies due to the additional capacitance introduced be the PEC filaments. An alternative that is, in most cases, a more accurate source representation is using the "Distribute Along Line" option, the source is equally distributed over all the discretized edges of a line element (see image, right). That prevents any PEC filaments and therefore makes the injection of the signal more realistic. Time delay = distance between the transmitter and receiver*sin(theta)/c where theta is the angle of antenna. I would suggest looking into antenna array literature for theoretical background on calculating this quantity.