Skip to content

Sim4Life

722 Topics 2.4k Posts

Subcategories


  • Installing Sim4Life and configuring licenses

    36 126
    36 Topics
    126 Posts
    D
    Thank you so much!
  • Working with CAD models

    63 225
    63 Topics
    225 Posts
    brynB
    preview (still working on the distance from e.g. F7 to F9) [image: 1757340222351-c2ee64b1-55df-41d6-9583-bd5832ceb962-image.png]
  • Working with models from the Virtual Population

    60 283
    60 Topics
    283 Posts
    AntoninoMCA
    Hi @fangohr, this is a very important question, especially considering the strong electrical anisotropy of muscle tissue. Unfortunately, the whole-body anatomical models provided with Sim4Life do not include DTI information that could be used to assign anisotropic properties. Therefore, if you want to model tissue anisotropy, alternative approaches are required. Some of these may be reasonable when the stimulation is regional, i.e. limited to a small number of muscles. In principle, Sim4Life allows you to model heterogeneous tissue anisotropy in two main ways. 1) Using subject-specific DTI data If you are working with a personalized model (e.g. a head model) and have subject-specific DWI data, you can proceed as follows: a. Reconstruct the DTI data from the DWI, bvec, and bval files (all standard outputs of MRI DTI). b. Convert the DTI into a conductivity tensor field using the Tuch model [1] Both steps are fully implemented in Sim4Life. Step (1) is performed via the Python API (please refer to the “Anisotropic Conductivity Tutorial” in the Examples section), while step (2) can be executed either through the Python API or directly in the GUI. The attached animation shows how processed DTI data can be converted into tissue anisotropy data structure using the Tuch approach, and assigned to WM conductivity. 2) Without DTI data (assumption-based approach) - Using an E-field distribution & Cylindrical Tensor Model If DTI data are not available, an alternative approach is possible, but its validity is entirely your responsibility. Sim4Life allows you to create a conductivity tensor field from a 3D vector field by assuming cylindrical symmetry of the conductivity tensor. In this case, the principal tensor direction is assigned according to the local direction of the vector field, and only the longitudinal (parallel to the fibers) and radial (perpendicular to the fibers) conductivities need to be specified (you can find these values in the IT'IS LF Database (https://itis.swiss/virtual-population/tissue-properties/database/low-frequency-conductivity/) The input vector field can be, for example, an E-field computed with any EM solver in Sim4Life, or a vector field generated via the Python API. One possible strategy would be to create an E-field aligned with the muscle fibers. This requires assumptions about muscle fiber organization — for instance, that fibers follow a diffusion-like process and extend from tendon to tendon. Under such assumptions, fiber directions could be approximated using an E-field computed with the QS-Ohmic Current solver, where the muscle is modeled as a homogeneous tissue and the tendons at the extremities act as Dirichlet boundary conditions. Please note that this is not a ready-to-use recipe. This approach may be reasonable for certain muscles and unsuitable for others, and it represents a strong simplification of the underlying physiology. You will need to define a plausible fiber model and then use Sim4Life to test and validate your assumptions. I hope this helps. If you need further or more specific assistance, please feel free to write again or contact the Sim4Life support team directly. All the best, Antonino [1] Tuch, D. S., et al. Conductivity tensor mapping of the human brain using diffusion tensor MRI. Proceedings of the National Academy of Sciences, 98(20), 11697–11701 (2001). [image: 1769594990533-anisotropy_from_dti_4.gif]
  • FDTD, Low-Frequency, Neuron, Mode-Matching, Flow, Acoustics, etc...

    261 785
    261 Topics
    785 Posts
    J
    I am new to sim4life and i need urgently to import Billie_V2_skin_functionalized.sab for optimization tutorial and i didn't find the cad files
  • Postprocessing results

    123 375
    123 Topics
    375 Posts
    B
    Hi, there aren't any known issues with the Multiplier tool that would prevent you from scaling your field by any arbitrary value. Is it possible that in your script, you are using the same variable 'output1' for each case and as such are calculating the same value each time? If you are still having issues, could you share your project and script with the support team via s4l-support@zmt.swiss?
  • Scripting interface for Sim4Life

    140 437
    140 Topics
    437 Posts
    brynB
    This is nice. Thanks @Robin-Wydaeghe
  • Running Sim4Life over a network

    4 7
    4 Topics
    7 Posts
    ofliO
    Hi, Please allow me to share here the response we sent you via the Sim4Life support email so that other users can benefit from your questions. The default machine provides 500GB of storage, and you are running out of space for this project. If your results require more than 500GB, consider upgrading to a higher-tier machine with greater storage capacity. Alternatively, you could reduce the size of your simulation project by splitting it into multiple smaller simulations. This would allow you to continue using the default tier. Additionally, you might optimize your sensor settings, such as by creating smaller sensors and recording data for specific volumes of interest, rather than using an Overall Field sensor.
  • Electro Ohmic Quasi-Stat Normalization

    2
    0 Votes
    2 Posts
    164 Views
    C
    When you use the normalization option, Sim4Life: Computes the current flux through an automatically generated iso-potential surface Scales all output quantities so that the resulting current matches the value specified in the Normalize Frequency-Domain Results field The current value you enter represents the phasor amplitude, i.e. the baseline-to-peak current. For more information, please refer to the Sim4Life Manual Section 2.13.7.3.3 Normalization -- Normalization to Current.
  • Export Huygens Source

    2
    0 Votes
    2 Posts
    389 Views
    H
    Hi @MB, The solution would be to export a separate Huygens source for each port individually (i.e., without using the Simulation Combiner). You can then set the amplitudes and phases of each Huygens source when you use them. This approach is quite powerful if you need to simulate multiple amplitude/phase configurations. However, we understand this might be a concern if you have a large number of ports involved. That said, we’re aware of this limitation and are working on adding this feature in an upcoming release.
  • sim4life.lite Tutorial

    4
    1 Votes
    4 Posts
    2k Views
    SylvainS
    The guided tours within the tutorials are indeed not working as intended. Thanks for pointing this out! Instead, I would recommend following the instructions in the text documentation of the tutorials: https://manual.sim4life.io/manual/Tutorials/index.html Let me know if you run into issues with a specific tutorial!
  • Electrode with Nerve Model tutorial

    5
    0 Votes
    5 Posts
    2k Views
    H
    Hi @cbenj33 we are aware of the inconsistencies (we have changed the position of the nerve and electrode, which will be part of the next release happening soon). For now, I am emailing you the pdf version of this tutorial documentation and explanations regarding the errors.
  • 0 Votes
    2 Posts
    1k Views
    brynB
    The voxeler (re-)uses cached information about the geometry (solids, wires, etc.). It looks up the information for each model entity and emits this message if the cached geometry was not found. Questions: are you running this in the GUI or a script/notebook? did you potentially delete (or modify) some of the entities assigned to the simulation (I guess in voxeler settings)? If you deleted the entity or modified it in the modeler (some operations preserve the instance, while others may create a new instance and delete the old one), this would explain the error. We could improve the error message by providing more helpful instructions.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • Volt and sensitivity of transducer sim4lite

    2
    0 Votes
    2 Posts
    1k Views
    M
    Assuming a linear relation between voltage and pressure amplitude, you should be able to map the input voltage to the input pressure (I think its 1 MPa by default), and then use this as a scaling factor, but it's unclear to me what you mean with voltage at the focused area. What exactly do you mean by transducer sensitivity? You could run additional simulations where you shift the transducer or slightly change some parameters to get a sense of the sensitivity.
  • 0 Votes
    3 Posts
    2k Views
    brynB
    Here is a simple implementation to write an iSEG tissue list file, given a dictionary mapping the label index to a name: https://github.com/dyollb/s4l-scripts/blob/df8e2241f87ca91d71138e9d2b3d4336dadb82dc/src/anisotropic_conductivity/load_labels.py#L44
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • Cannot open .smash project file

    3
    0 Votes
    3 Posts
    2k Views
    J
    Thank you so much you are a godsend 🙏 You saved me a couple days worth of work!
  • Heat generation rate and Heat transfer rate in a MQS/Thermal simulation

    4
    0 Votes
    4 Posts
    2k 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.
  • Grid Convergence

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    B
    To perform such a study, define your region or quantity of interest, then parametrize it. After a quantity has been parametrized, you can run multiple simulations using the built in Sweeper feature or using the Sim4Life Python API. There is an example in the Sim4Life manual titled 'Parametrized Patch Antenna' that shows how to use the Sweeper feature. If using the Python API, the easiest way would be to create a baseline simulation by hand, then right-click on the simulation name and select To Python. Then you would find the quantity of interest in the auto-generated script and assign it to a variable instead of the hardcoded value. Using a simple loop in Python, you can create multiple simulation that have identical setup except for parameters of interest. In your example, multiple simulations would be run with identical setup except for the grid resolution within a region of interest (e.g., a wire block surrounding a region of interest is placed in a manual grid settings folder, then Maximum Step is changed from 0.3 to 1.0 mm). Then in Analysis you extract a quantity of interest and compare how this value changes as a function of grid resolution. If the change in the value is small as you increase resolution, you can proceed in future simulations with a coarser resolution to save on run time. The exact convergence of the value needed depends on your application.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • My S4L file isn't opening after it crashed

    3
    0 Votes
    3 Posts
    2k Views
    D
    @bryn Thank you Bryn. Managed to find a version that wasn't corrupted! Hope you have a nice day :)
  • 3D Surface model to Voxel and export

    2
    0 Votes
    2 Posts
    2k Views
    brynB
    Are you using Sim4Life lite (web version)? I recorded my screen while I voxeled Duke V2.0 and exported the voxels. There seems to be a glitch in the Reload button when I try to see the data that was saved in the Study: as a workaround the Reload button in the DATA tab works. I voxeled at 15mm, so the skin is not completely closed, but if you choose something like 5-10mm it should be enough to resolve thin layers (like the skin): BTW. if you are using a desktop version of Sim4Life, the workflow is similar, except that the software uses native Windows file dialogs to save/load files. https://youtu.be/uAQgQQpG3Bg
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    29 Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • Simulate a concave multi-element ultrasound array

    4
    0 Votes
    4 Posts
    3k Views
    M
    Assuming 'sim' is the acoustic simulation you're interested in and that 'elements' is a list of the elements (gotten from entities = model.AllEntities()) and that 'amp' and 'phase' are numpy arrays with the amplitude, phase values you're interested in assigning: # Print current simulation name print(sim.Name) # Remove all sources before adding them to_del = [] for s in sim.AllSettings: if isinstance(s,acoustic.SourceSettings): to_del.append(s) for d in to_del: sim.Remove(d) # Add sources with correct element and parameters for source_idx in np.arange(len(elements)): source_settings = acoustic.SourceSettings() source_settings.Amplitude = amp[source_idx] source_settings.Phase = phases[source_idx] sim.Add(source_settings, rings[source_idx]) print(rings[source_idx].Name, amp[source_idx], phases[source_idx]) Sorry I'm not providing a full example. Easiest way to do that would be to manually create the whole simulation without the sources (just make all sources as materials), then right click on simulation and select 'To Python...' and then add the lines above to your code You could do something like this to get the elements as a list: src_ents = [] entities = model.AllEntities() for e in entities: if 'Element' in e.Name: src_ents.append(e) Careful, I have no idea how the elements will be sorted in that case but you could use a fixed size numerical suffix and then sort them.
  • File .Smash error

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hallo, There should be, in the same folder where the smash project is, a file named as the smash file, but starting with a ".", like ".Name_of_the_File.smash.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". Try to drag that file directly into Sim4Life and save it with a different name. From there you should be able to go on with the models/simulations/analysis settings already saved.
  • Cannot read document verion

    3
    0 Votes
    3 Posts
    2k Views
    L
    I have two versions installed (6.2.2 and 7.00) and I tried opening the file with both. I have now deleted the smash file that wasn't working and started over, but if it happens again, I will try the import option- thanks!