Inquiry Regarding TI Simulation Setup in Sim4Life
-
Dear ZMT team,
I am a new user of Sim4Life and currently exploring TI simulations. While setting up the simulation, I encountered a few questions and would appreciate your guidance.
1.Electrode Frequency Configuration
Is the frequency setting for TI stimulation configured exclusively through the GUI path Setup > Frequency?
If scripting is preferred, is the following Python code snippet correct for setting the frequency to 2 kHz?
quasi_static_setup_settings.Frequency = 2000.0 * units.Hz
2.Current Amplitude Setup (2 mA)
To achieve a total current of 2 mA through a circular electrode (radius = 4 mm), I calculated the current density as 1/ΠR2 mA/mm² and applied it via Boundary Conditions > Constant Flux.
However, the Analysis > Max Modulation output appears empty. Could you confirm if this approach is correct or suggest alternative methods to define the current?
3. Result Export for TI Interference
How can I export the TI interference results (e.g., electric field magnitude) for all voxels or a specific point in the brain? Are there predefined scripts or GUI options for this purpose?
I apologize if these questions are basic, but your clarification would greatly help my learning process. Thank you for your time and support.
-
Hi,
I strongly recommend you have a look at the tutorial 3.2.12 called Temporal Interference with Complex Head Model. It should be of significant help for setting up a TI simulation correctly.As for your specific questions:
- yes, that's correct. You can actually get the full Python script that generates a given simulation from the GUI by right-clicking on the simulation in the Explorer tree and selecting "To Python". Very useful :)
- That will most likely not work. Instead, you should apply fixed voltage Dirichlet conditions (e.g. +/- 1V) and re-normalize your results at post-processing (see screenshot below)
- For most fields that you can see in the analysis, you can use the Imp/Export menu in the ribbon and find a format in which to export (e.g. Matlab, VTK, or even plain text).