input.json Overview
eMachineSim uses JSON input control files. Public user workflows pass these
files, or equivalent Python dictionaries, to eMachineSim.
The safest way to start is to copy a validated sample JSON for the analysis type you need, then edit one section at a time.
Required Metadata
Every eMachineSim input control file must start with a metaData object. This
prevents files from other JSON-based tools from being loaded accidentally.
{
"metaData": {
"type": "eMachineSimInput",
"eMachineSimVersion": "0.1.1",
"comments": "Thermal analysis sample input."
}
}
The type field must be exactly eMachineSimInput.
The eMachineSimVersion field is checked against the installed license version.
Only the main.sub part is compared, so values such as 0.1.1 and 0.1.3
are treated as 0.1. The input file is accepted when:
input eMachineSimVersion main.sub <= license eMachineSimVersion main.sub
Common Top-Level Ideas
Exact field names differ by analysis type, but most inputs describe:
| Concept | Purpose |
|---|---|
| analysis type | Selects thermal, structural, modal/NVH, or electrostatic behavior. |
| mesh | Defines the mesh source, including FEMAP/ATLAS-style files or BDF files. |
| materials / properties | Defines analysis material data or maps imported property IDs. |
| boundary conditions | Defines temperature, heat flux, displacement, force, constraint, or contact settings. |
| sources / loads | Defines QVOL, JSON heat sources, centrifugal loads, or imported nodal forces. |
| outputs | Enables diagnostic CSV files and post files. |
Thermal: Small BDF QVOL
Use this sample to check BDF import, QVOL integration, and closed heat balance.
Examples/thermal/bdf/input_sample_bdf_min_hexa_qvol.json
Typical run:
import eMachineSim
result = eMachineSim.thermal.run_file(
r"Examples\thermal\bdf\input_sample_bdf_min_hexa_qvol.json",
r"Examples\thermal\bdf",
)
Representative JSON concepts:
{
"mesh": {
"format": "nastran_bdf",
"file": "min_hexa_qvol.bdf"
},
"bdf_import": {
"qvol_enabled": true,
"material_source": "json",
"exclude_property_ids": [50]
}
}
Use bdf_import.exclude_property_ids when the input BDF contains regions that
should not participate in the thermal FEM model. For example, a magnetic-field
mesh may include an outer air region. In a motor thermal model, that air region
can be excluded so the motor outer surface becomes the FEMH or thermal-network
connection surface.
Thermal: Realistic Motor Steady Sample
Use this sample when you need BDF/QVOL, coil copper loss, PM loss, FEMH thermal network connections, surface assignment diagnostics, and gap coupling.
Examples/thermal/realistic_motor_steady/input_realistic_motor_steady_physical_gap_nu1.json
Representative heat-source section:
{
"thermal_volume_heat_sources": [
{
"name": "coil_copper_loss",
"mode": "coil_copper_loss",
"current_waveform": "sinusoidal_rms",
"frequency": 50.0,
"modeled_length_ratio": 1.0,
"coil_fill_factor": 0.35,
"distribution": "uniform_by_target_volume",
"phases": [
{"name": "U", "property_ids": [10000, 10001], "current_rms": 3.0, "phase_resistance": 0.852},
{"name": "V", "property_ids": [10004, 10005], "current_rms": 3.0, "phase_resistance": 0.852},
{"name": "W", "property_ids": [10002, 10003], "current_rms": 3.0, "phase_resistance": 0.852}
]
},
{
"name": "pm_magnet_loss",
"mode": "total_heat",
"target": {"property_ids": [50000]},
"total_heat": 5.0,
"modeled_fraction": 0.25,
"distribution": "uniform_by_target_volume"
}
]
}
Representative gap coupling concept:
{
"thermal_network": {
"gap_thermal_couplings": [
{
"name": "main_airgap_coupling",
"pairing": "main_airgap_filtered",
"enabled": true,
"mode": "nu",
"nu": 1.0,
"air_thermal_conductivity": 0.026,
"gap_thickness": 0.001,
"assembly": "node_pair_lumped"
}
]
}
}
Structural Static: Rotor
Use these samples for 2D rotor structural analysis, centrifugal loading, and contact-oriented diagnostics.
Examples/structural/rotor/input_rotor_2d_1500rpm_smoke.json
Examples/structural/rotor/input_rotor_2d_3000rpm_smoke.json
Examples/structural/rotor/input_rotor_2d_1500rpm_shaft_bc_no_contact.json
Run:
import eMachineSim
result = eMachineSim.structural.run_file(
r"Examples\structural\rotor\input_rotor_2d_1500rpm_shaft_bc_no_contact.json",
r"Examples\structural\rotor",
)
Modal / Motor NVH: Stator
Use these samples for modal analysis and simplified motor NVH workflows.
Examples/structural/modal_stator/input_modal_stator_sparse_modal.json
Examples/structural/modal_stator/input_modal_stator_force_mapping.json
Examples/structural/modal_stator/input_modal_stator_frequency_response.json
Examples/structural/modal_stator/input_modal_stator_acoustic_radiation.json
Run:
import eMachineSim
result = eMachineSim.modal.run_file(
r"Examples\structural\modal_stator\input_modal_stator_sparse_modal.json",
r"Examples\structural\modal_stator",
)
Electrostatic
Electrostatic examples are currently smaller sample workflows, but they are kept visible for future electric/electrostatic extensions.
Examples/electrostatic/3by3/input_sample_3D_3by3.json
Examples/electrostatic/ring/input_sample_3D_ring.json
Run:
import eMachineSim
result = eMachineSim.run_file(
r"Examples\electrostatic\ring\input_sample_3D_ring.json",
r"Examples\electrostatic\ring",
)
How to Modify Samples
Recommended workflow:
- Copy the closest sample JSON.
- Keep the original sample directory structure until the copied case runs.
- Modify mesh/material/boundary/source sections one at a time.
- Inspect the output CSV files after every change.