Sim4Life

598 Topics 1.9k Posts

Subcategories


  • Installing Sim4Life and configuring licenses

    31 Topics
    107 Posts

    I have installed sim4Life version 8 and the software is running properly. However, when I try to run simulation there is the following error message: No matching solver found to process the simulation.

  • Working with CAD models

    57 Topics
    193 Posts

    Hi @bryn, I'm meshing an implanted device as a faceted mesh which is then embedded in an octree mesh. This is all through the Python API.

  • Working with models from the Virtual Population

    48 Topics
    214 Posts

    I see the limitation. I will discuss if we can add more degrees of freedom to Jeduk (and subsequently other ViP posable models).

    With the current model, a flexion of 20 degrees seems acceptable. More rotation and the chin starts to strongly self-intersect with the neck (see screenshot and the attached posture file).

    26f1fe70-03e7-47ec-8911-a06b68f9377e-image.png

    Posture file: please rename the extension to .pose:
    Jeduk_flexion.pose.txt

  • FDTD, Low-Frequency, Neuron, Mode-Matching, Flow, Acoustics, etc...

    220 Topics
    658 Posts

    Dear Ali,

    It looks like the path to iSolve is not set correctly. Please follow the steps below:

    Open Ares on the machine where Sim4Life is installed Click on the blue cross at the end of the line labeled "Paths to the iSolve solver executables." This will open a pop-up window. (see the image below) If the list of solvers is empty or the one you intend to use is not listed, simply add the path to the relevant solver. Restart Sim4Life.

    aresisolve.png

  • Postprocessing results

    97 Topics
    271 Posts

    Thanks, the simulation file is from sim4life V7.2, so I'm not able to see the convergence in the analysis window.

    Fortunately, I have found the "x_Output.log" in my Results file, but I can't understand it.

    Could you please explain the meaning of each row in the results file?

    Take an example like this:

    Sensor 'Capacitor_L 1 (Current L)' Exponential moving average factor 0.894427, Harmonic steady state detector: time step 3.08414e-10s, frequency 64MHz, approximate quarter period 3.70097e-09s, target convergence level -50 dB Iteration number and conventional convergence level in dB <raw> <ema> [<raw> <ema> ...]: 16800 13.9358 1.47124 8.4181 0.888723 18816 7.67597 2.12629 15.5107 2.43241 20832 14.0806 3.38834 13.5789 3.60917 22848 1.26816 3.16451 7.74689 4.046 24864 4.59394 3.31542 3.89595 4.03016 26880 -2.64392 2.68627 0.958616 3.70589 28896 0.107048 2.41398 -1.53674 3.15241 30912 -4.9591 1.63558 -3.76506 2.42211 32928 -2.79052 1.1683 -6.11092 1.52126 34944 -5.90745 0.421296 -8.34643 0.479498 36960 -4.81187 -0.131184 -10.7496 -0.705992 38976 -5.89793 -0.739996 -13.7845 -2.08673 40992 -6.1714 -1.3134 -17.1553 -3.67755 43008 -5.32482 -1.7369 -21.5846 -5.56806 45024 -6.82203 -2.27375 -32.324 -8.39276 47040 -2.12306 -2.25784 -15.5315 -9.14641 49056 -0.278664 -2.0489 -3.5348 -8.55398 51072 -6.34679 -2.50264 -2.30536 -7.8943 53088 -0.399402 -2.28059 -2.38639 -7.31281 55104 -9.37643 -3.02972 -4.00497 -6.96359 57120 -29.014 -5.77295 -18.2975 -8.16015 59136 -55.4153 -11.0138 -31.9566 -10.6724 61152 -57.6383 -15.9361 -37.9006 -13.547 63168 -58.9883 -20.4813 -26.9761 -14.9647 65184 -58.6026 -24.5058 -39.9291 -17.6003 67200 -57.9518 -28.0368 -37.4931 -19.7004 69216 -59.1574 -31.3223 -36.9919 -21.5259 71232 -59.0974 -34.2546 -28.7893 -22.2927 73248 -59.633 -36.9339 -25.1269 -22.592 75264 -59.2213 -39.2868 -31.2338 -23.5043 77280 -59.5994 -41.4313 -27.1446 -23.8886 79296 -59.9846 -43.39 -25.5704 -24.0662 81312 -61.3968 -45.291 -28.9199 -24.5786 83328 -61.7502 -47.0287 -26.6773 -24.8002 85344 -61.0201 -48.5058 -30.0321 -25.3525 87360 -61.1226 -49.8378 -25.216 -25.3381 89376 -63.0251 -51.23 -33.6491 -26.2155 91392 -66.6494 -52.8579 -33.5 -26.9845 93408 -67.4893 -54.4026 -29.6102 -27.2617 95424 -70.0935 -56.0591 -29.03 -27.4484 97440 -71.562 -57.6958 -27.7633 -27.4817 99456 -69.5748 -58.9499 -26.854 -27.4154 101472 -78.6 -61.0244 -28.1287 -27.4907 103488 -67.7923 -61.7389 -25.6139 -27.2926 105504 -68.4293 -62.4452 -23.2911 -26.8701 107520 -65.0311 -62.7182 -24.074 -26.5749 109536 -65.161 -62.9761 -31.2989 -27.0737 111552 -65.5676 -63.2497 -29.642 -27.3448 113568 -61.3018 -63.0441 -27.2672 -27.3366 115584 -60.839 -62.8113 -26.1289 -27.2091 117600 -60.3076 -62.5469 -27.3216 -27.221 119616 -61.3064 -62.416 -26.3063 -27.1244 121632 -62.103 -62.3829 -28.0492 -27.2221 123648 -61.1791 -62.2558 -34.3984 -27.9797 125664 -61.6997 -62.1971 -24.1963 -27.5803 127680 -60.7142 -62.0406 -27.5361 -27.5756 129696 -62.5137 -62.0905 -28.7848 -27.7033 131712 -62.9527 -62.1815 -28.8431 -27.8236 133728 -63.5879 -62.33 -27.4008 -27.779 135744 -63.518 -62.4554 -27.3935 -27.7383 137760 -66.5672 -62.8895 -37.3044 -28.7482 139776 -66.7306 -63.295 -28.7205 -28.7453 141792 -66.0728 -63.5883 -24.7314 -28.3215 143808 -67.7974 -64.0327 -24.6679 -27.9358 145824 -69.0101 -64.5581 -25.0781 -27.6341 147840 -67.3162 -64.8493 -16.4316 -26.4514 149856 -66.9178 -65.0677 -21.271 -25.9045 151872 -72.7687 -65.8807 -28.3618 -26.1639 153888 -69.2686 -66.2384 -21.0304 -25.622 155904 -68.7916 -66.5079 -17.7813 -24.7942 157920 -65.0066 -66.3494 -19.2192 -24.2056 159936 -68.1325 -66.5377 -26.2937 -24.4261 161952 -64.7744 -66.3515 -23.2103 -24.2977 163968 -68.9681 -66.6278 -21.4553 -23.9976 165984 -67.3859 -66.7078 -18.5064 -23.4179 168000 -66.1211 -66.6459 -23.847 -23.4632 170016 -67.4045 -66.726 -19.9166 -23.0888 172032 -65.1708 -66.5618 -25.465 -23.3397 174048 -68.6925 -66.7867 -22.8274 -23.2856 176064 -67.0903 -66.8188 -25.4394 -23.513 178080 -64.5303 -66.5772 -19.6368 -23.1038 180096 -64.284 -66.3351 -20.7205 -22.8522 182112 -64.9833 -66.1924 -22.9353 -22.8609 184128 -64.2102 -65.9831 -17.2516 -22.2687 186144 -61.8411 -65.5458 -18.5849 -21.8798 188160 -67.4312 -65.7449 -22.0218 -21.8948 190176 -63.0463 -65.46 -29.3056 -22.6772 192192 -73.1833 -66.2753 -18.072 -22.191 194208 -62.5461 -65.8816 -17.785 -21.7259 196224 -66.6467 -65.9624 -21.6314 -21.7159 198240 -63.3296 -65.6845 -23.0527 -21.857 200256 -66.4044 -65.7605 -26.6222 -22.3601 202272 -66.1052 -65.7969 -25.6971 -22.7124 204288 -63.9959 -65.6067 -19.0422 -22.3249 206304 -67.4349 -65.7997 -26.79 -22.7963 208320 -65.1095 -65.7269 -26.0593 -23.1408 210336 -68.519 -66.0216 -24.4157 -23.2754 212352 -65.3768 -65.9536 -18.3469 -22.7551

    By the way, what's the meaning of "convergence", and which value or formula do we use to express this variable?

    Thank you very much for your prompt response!

  • Scripting interface for Sim4Life

    115 Topics
    321 Posts

    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!

  • Running Sim4Life over a network

    3 Topics
    5 Posts

    I eventually configured Sim4Life on a Cloup GPU workstation (paperspace.com). The workstation has an Intel Xeon E5-2630 v3 processor, 16 virtual cores, 90 GB of RAM, and two NVIDIA Ampere A6000 GPUs, each with 48 GB of GPU memory. For Exablate Neuro transducers (220 and 670 kHz) simulations, the workstation improved simulation speed from about 200 Mcell/s with an 8-core OpenMP configuration, to about 12000 Mcells/s with two GPUs.

    The workstation allows simulations (1449x1149x816 grid, 200 periods, 670 kHz, 0.22 mm max step for 10 points per wavelength) in about 40 minutes with Fourier-domain sensor recordings and about 4 hours with Time-domain sensor recordings. Time-domain simulations seem only compatible with a single GPU, while Fourier-domain sensor simulations can use both GPUs. Also, the Fourier domain field sensor recordings create simulations that look unstable (or less accurate) compared to the time-domain field sensor recordings, with all other factors equal. Only the time-domain simulations have readily matched previous studies, but the simulation time is still too long.

    Can the time-domain sensor acoustic simulation be run on multiple GPUs? Also, most of the time for Fourier-domain simulations is spent "allocating memory for the voxel array." Is there a way to configure the GPU to preallocate memory or another way to reduce the amount of time to distribute the array memory?
  • 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
    216 Views

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

  • 0 Votes
    4 Posts
    219 Views

    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.
    For example, if you wish to enter constant perfusion up to 37 degrees, linear perfusion of 10 times the "standard" perfusion rate between 37 and 43 degrees, and constant perfusion above 43 degrees, then you would enter:
    transition temperatures: [37,44], linear coefficients: [10,0].

  • Grid Convergence

    Unsolved
    2
    0 Votes
    2 Posts
    202 Views

    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
    274 Views

    @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
    267 Views

    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.

    Youtube Video

  • 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
  • 0 Votes
    4 Posts
    571 Views

    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
    361 Views

    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
    361 Views

    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
    238 Views
    No one has replied
  • 0 Votes
    3 Posts
    478 Views

    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
    658 Views

    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

  • 0 Votes
    5 Posts
    1k Views

    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

  • Why does TRP exceed input power(Antenna)?

    2
    0 Votes
    2 Posts
    412 Views

    The TRP is computed in a different way than the input power. Both ways are mathematically correct and would both be "exact" if there were no numerical errors. In any FDTD simulation, however, there are spatial (finite grid) or temporal (finite time step) discretization error.
    What you are seeing in this half-wave dipole example, is that those discretization errors are larger than the precision you would require to distinguish TRP from input power (because the radiation efficiency is very high in this case, there is almost no difference between TRP and input power).

    To solve this "problem", either you accept that the simulation results are accurate enough for your needs (the warning is a simple consistency check) or you increase the precision of the simulation. You can do so by increasing the grid resolution, the overall convergence level and the resolution of the far-field sensor. This will be computationally expensive, though.

    To help you understand, you could try to add some lossy media in your (coarse) simulation (e.g. place the dipole next to a phantom or any other dielectric). The simulation will not be more precise, but the numerical errors will be less "obvious" because they will be dwarfed by the losses occurring in the dielectric. The TRP will be lower than the input power and the warning will not be triggered.

    I hope this helps.

  • 0 Votes
    1 Posts
    258 Views
    No one has replied
  • S4L is unable to read and load my project

    18
    0 Votes
    18 Posts
    2k Views

    THank you very much for the hints.

  • 0 Votes
    5 Posts
    1k Views

    That works! If it's for a 2D plot, you can always right click and export the data to an excel or csv file and then work with that if you'd prefer