Skip to content

Sim4Life

669 Topics 2.2k Posts

Subcategories


  • Installing Sim4Life and configuring licenses

    34 120
    34 Topics
    120 Posts
    G
    Did you do one of the following: • Define the FlexNet environment variable FLEXID_LIBRARY_PATH to point to the location of the dongle shared object, libhasp_linux_x86_64.so. • Define the system environment variable LD_LIBRARY_PATH to point to the location of the dongle shared object libhasp_linux_x86_64.so. ? Could you try to send us the output of lmhostid -flexid? that command should return the dongle id. You can also access the dongle firmware - if it is correctly installed - via the loopback address. On a browser, go to http://localhost:1947/ you should see the characteristics of the dongle. Let us know if it works.
  • Working with CAD models

    58 197
    58 Topics
    197 Posts
    V
    @brown Thank you for the suggestion. I can surface project object now.
  • Working with models from the Virtual Population

    56 265
    56 Topics
    265 Posts
    brynB
    What does it mean "causing trouble"? Do you get an error message, or it generates unexpected results? You probably already know, but you can generate a script by setting up the simulation in the GUI, selecting it and running "To Python" in the context menu. Your script is incorrect. You use only one material settings for all tissues in Duke. However, different tissues (fat, muscle, bone, blood, lung, etc.) have very different properties. To replicate what the GUI does, you probably would want to group all entities with the same material tag (entity.MaterialName), get the material from the database, and create linked material settings: material_settings = emfdtd.MaterialSettings() components = [e for e in xcm.CollectEntities(duke_group.Entities) if e.MaterialName == "Muscle"] mat = database["IT'IS 4.2"]["Muscle"] simulation.LinkMaterialWithDatabase(material_settings, mat) simulation.Add(material_settings, components) Your script may also be wrong, because duke_group.Entities contains a sub-group "Bones". To recursively collect all entities in duke use CollectEntities: import XCoreModeling as xcm duke_all_entities = xcm.CollectEntities(duke_group.Entities) You also want to create ManualGridSettings (with specified grid spacing), or AutomaticGridSettings, and assign the entities. You can then run UpdateGrid simulation.UpdateAllMaterials() simulation.UpdateGrid() simulation.CreateVoxels()
  • FDTD, Low-Frequency, Neuron, Mode-Matching, Flow, Acoustics, etc...

    243 728
    243 Topics
    728 Posts
    A
    Dear ZMT Team, I am currently studying the Temporal Interference tutorial with the SAM Head model, as provided in the Sim4Life documentation (Tutorials/EMLF/LF_Multiport.html#temporal-interference-with-sam-head). I have followed the steps carefully up to the solver stage. However, during the simulation run, I encountered the following warning: Solid X_Electrode (Selected_Electrode): PEC - no edges associated with this material and thus it is disregarded. Also, I’m not sure if the simulation problem affects the analysis. The E-field distribution doesn’t show up, but the tutorial shows it in the figure at the bottom. Could you kindly advise if this warning affects the simulation output, and how I might resolve the issue or verify my results? Thank you very much for your time and support. [image: 1749129382269-c7cdb453-8be8-45f7-b162-a58fdb9c2df0-092feff5f73e01f28fb8dda1e836baef_720.png] [image: 1749129391541-d69cf584-fa96-42a7-95ab-d3e2e9bf7ee9-38acb77f82170de35e115f91dae39ebd_720.png] [image: 1749129421971-4b0d1cc0-444e-4e57-8c07-fff11beb99b0-image.png]
  • Postprocessing results

    109 320
    109 Topics
    320 Posts
    I
    Hello, What voltage values should I input as the amplitudes under Analysis->Simulation Combiner->Channel Parameters if I want to visualize the E-field for a simulation with boundary settings set to a constant flux? Here are the pertinent details and what I've already tried. I am performing an LF-electro ohmic quasi-static simulation with the rhesus macaque (Miss Able) model. I created two electrodes with cylinders to resemble the screw electrodes that we use for epidural ACS in my lab. Under the Simulation->Boundary Conditions->Boundary Settings for the two electrodes, I set the Boundary Type to Flux, with a constant flux of 2.47 mA. Then, I checked the Treat as Port box. I understand that the voltages for the amplitudes under Analysis->Simulation Combiner->Channel Parameters applies to the analysis, so it did not change the constant flux value that I input for the simulation stage. However, I don't know what voltages I should input to reflect the true E-field value for the 2.47 mA. I tried acquiring the appropriate voltages for the simulation combiner amplitudes by outputting the EM potential for each of the electrodes. This yielded a max of 0.707 V. Then, I input that value into the simulation combiner amplitudes field, setting amplitude 1 to 0.707 V and amplitude 2 to -0.707 V. Next, I clicked on EM Sensor Combiner for the overall field, EM E, and Slice Viewer. However, when I tried following these same steps for a constant flux of 1.98 mA, it also exhibited 0.707 V. So, either I'm doing something wrong or I do not understand the parameters that I am using to visualize the E-field properly. I was also wondering if perhaps the electric field was normalized for the simulation combiner, so it is not giving me the true E-field value for a given constant flux. Could you please help me output the accurate E-field value for ACS, given a constant flux of some value (in milliamps)? Thanks, Ian [image: 1749064870293-0314f288-b1f6-42c7-83a9-3f18d86d9fec-image.png] [image: 1749064913368-7f42c3ec-1900-4fe8-a967-8b1491c45760-image.png]
  • Scripting interface for Sim4Life

    134 420
    134 Topics
    420 Posts
    A
    Thank you for your help. I will run it in a previous version.
  • 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.
  • 0 Votes
    2 Posts
    27 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
    206 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
    353 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
    528 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
    582 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
    470 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
    595 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
    528 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
    957 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
    591 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
    666 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!
  • Bone identification using RF signals

    1
    0 Votes
    1 Posts
    367 Views
    No one has replied
  • The file I created with Sim4Life light cannot be opened.

    3
    0 Votes
    3 Posts
    767 Views
    brynB
    If you don't have a full version, i think (untested) you can still recover the model by importing the smash file in the modeling tab.
  • 'Point Sensor Tool' is not available

    7
    0 Votes
    7 Posts
    2k Views
    M
    Sorry, don't have S4L with neuron available at the moment, but I looked at the tutorial and it seems to have changed. When you create the sensor settings can you try to drag and drop the axon to the sensor setting and then chose the section name? (That was the old way of doing it) Still, you should be able to run the simulation without a point sensor.. Sorry can't help more
  • Everytime I'm doing a too complex simulation the file is lost

    5
    0 Votes
    5 Posts
    2k Views
    L
    I am using Sim4Life 6.2.1.4972. It happened once when I've had put a high "maximum number of samples" in the time domain (200 I think) with the acoustic head tutorial that I changed a bit, by putting 2 transducers instead of 1. Another time it was weird because it happened with a SEFT targeting a square of skin, which was rather simple but it did crash again. My simulation was probably wrong in a way, but it didn't throw and error and just stopped. But now that I am applying @gbgbha advices, it is fine :) and thanks for the tip ! I'll try for the file that I lost