This page provides tips to:
- run scripts based on the OS.
- troubleshoot issues in model development and model convergence.
- troubleshoot issues due to software packages.
Running python scripts for mesh generation and template model generation
Usage instructions:
Linux
• Need Salome 7.8 to run StlToMed.py and MedToFebio.py (both written in Python 2.7)
Windows
• Need Salome 8.3 (to run MedToFebio.py, older versions do not work) • However, if Salome 8.3 is used to correct ties and contacts in MED files then the exported version is MED 3.3.1 which will not be compatible with Salome 7.8 (required for Linux). • In that case either use Salome 7.8 or Salome 9.2 (or above) to correct MED files and save in MED version 3.2. • To run StlToMed.py and MedToFebio.py from Salome 8.3,
- Open command prompt
- navigate to Salome directory,
type: >run_salome.bat -t --pinter path\StlToMed.py OR path\MedToFebio.py args:path\ Connectivity.xml
Both
- • In connectivity.xml file all .stl locations have to be pointed to the directory they are located in.
Script specific
MedToFebio.py
- • MED files have to be in version 3.2. • Does not work well on Windows
Note: Febio 2.7 works if pre-strain is not used, otherwise use Febio 2.8(or above).
- Preferably, use Febio version 2.9 as it handles contacts better
OS preference:
- • Segmentation/geometry generation (Slicer, Meshlab): Windows/Linux
• StltoMed.py (Salome): Linux • Fix contacts and ties(Salome): Linux, Windows (have to export MED files in v3.2) • MedtoFebio.py (Salome): Linux, Windows • Pick Landmarks (Meshlab): Windows/ Linux • Customization: Windows/Linux • Febio: Windows/Linux (edit geometry file location in Febio_custom.feb)
Installing python packages in Salome
Windows
If certain python libraries are not installed in Salome’s Python installation– go to the folder where python is installed in the Salome directory – open power shell – type – .\python -m pip install <library>
- Linking external packages does not usually work well in windows.
Linux
https://simtk.org/plugins/moinmoin/multis/Infrastructure/AuxiliarySoftware/Python_with_SALOME
Building model with updated model component
- Update component (update MED files)
- Transfer MED groups (using python script)
- convert MED files to version 3.2 (Salome 9.2 and above)
- Update connectivity.xml (if needed)
- MED2FEbio.py
- Customize
- run in febio 2.9
Model convergence troubleshooting
- reduce mesh size
- adjust mcl-msn_m ties spring stiffness
- adjust prestrain values
- mci-mns_m contact may need to be added in some cases
- check surface and volume mesh quality before template model generation
- individually turn off contacts
for further details go to, https://simtk.org/plugins/moinmoin/openknee/Specifications/ModelTroubleshooting