Magnetics: Input Shapes and Units
Prepare three-component fields and grids for MAGNETICS_API_v1 with the shapes, component ordering, and units required by each operation.
Coordinates and fields
Store coordinates and three-component fields in N×3 arrays. For a regular grid defined by its axes, store the three coordinate axes in the cell node and place the three field components along the last dimension of the vector tensor. Declare B in T, H in A/m, length in m, permeability in H/m, and energy in J. If you only compute a norm from components supplied in nT, the result remains in nT.
Operation reference
Jump to an operation
No matching operations.
Reserved surfaces and public interfaces
::GX::MagneticsAPIv1::apiInfo- Access policy
REGISTERED_TYPED_ADAPTER- Public operation
api_info- Usage conditions
- The original math.magnetics module reads the installed descriptor, version, and capabilities from a fixed path. The api_info adapter calls that function directly and preserves all fields, capability order, and the original provider version string. It types only the declared API version. The shared registry’s describe metadata has its own contract. The call reads installed metadata only.
::GX::MagneticsAPIv1::call- Access policy
REGISTERED_TYPED_ADAPTER- Public operation
call- Usage conditions
- The public call takes family, action, a, b, c, and an optional typed options struct. It checks the full operation ID against the module’s list and uses ScientificTransportv1 with the original kernel. If options is omitted, the Tcl default applies. The call returns all fields declared by resultTypes through the existing codec, preserving binary64 real or complex components, shapes, and unit strings. Calls for individual families and actions remain available. Signal bulk execution follows its own path. The typed result documents the data returned by the transport. The raw Tcl interface has its own contract.
::GX::MagneticsAPIv1::listOperations- Access policy
REGISTERED_TYPED_ADAPTER- Public operation
list_operations- Usage conditions
- The list_operations call reads the module’s installed TSV and returns its exact identifiers in their original order. Script Bridge registration keys belong to a separate list. For Signal, the original list adds statistical_contract. operation_schema, validate_operation, and the adapters have separate registrations. The call rejects unknown arguments and reads the installed module descriptors.
::GX::MagneticsAPIv1::operationMetadata- Access policy
REGISTERED_TYPED_ADAPTER- Public operation
operation_metadata- Usage conditions
- The operation_metadata call looks up an actual operation ID in the module’s TSV and merges the original family and help metadata. For Signal it retains the complete operationSchema result, including ui_field and final_scientific_checks. It returns argument descriptors and result fields in the original order and preserves the strings for units, defaults, and bounds. An unknown ID returns the module’s original error. The operation reads installed metadata.
api_info
- Access
- Registered in the Python Job
- Arguments
[]- Result
- Complete result from the original module through the existing typed transport. The module remains the source of the computation and its provenance.
- Purpose
- Information about the installed module and its capabilities
gxtxt_api_call("MAGNETICS_API_v1", "api_info", args)Recorded result · api_info
Download the example script (ZIP).
Example operands preview
[]
Result preview
{
"api_id": "MAGNETICS_API_v1",
"api_version": 1,
"provider_id": "math.magnetics",
"provider_version": "1.2.0",
"capabilities": [
"coordinates",
"field",
"integral",
"constitutive",
"circuit",
"energy",
"bh",
"loss",
"anisotropic_permeability",
"nonlinear_bh"
]
}list_operations
- Access
- Registered in the Python Job
- Arguments
[]- Result
- Complete result from the original module through the existing typed transport. The module remains the source of the computation and its provenance.
- Purpose
- Ordered list of module operations
gxtxt_api_call("MAGNETICS_API_v1", "list_operations", args)Recorded result · list_operations
Download the example script (ZIP).
Example operands preview
[]
Result preview
[ "coordinates.cartesian_to_cylindrical", "coordinates.cylindrical_to_cartesian", "coordinates.cartesian_to_spherical", "coordinates.spherical_to_cartesian", "field.magnitude", "field.phasor", "field.normal_component", "field.sample", "field.gradient", "field.divergence" ]
operation_metadata
- Access
- Registered in the Python Job
- Arguments
operation- Result
- Complete result from the original module through the existing typed transport. The module remains the source of the computation and its provenance.
- Purpose
- Metadata for the requested operation
gxtxt_api_call("MAGNETICS_API_v1", "operation_metadata", args)Recorded result · operation_metadata
Download the example script (ZIP).
Example operands preview
[ "integral.surface_flux" ]
Result preview
{
"id": "integral.surface_flux",
"summary": "integral surface flux",
"api_id": "MAGNETICS_API_v1",
"api_version": 1,
"operands": "geometry,field,connectivity,options",
"input_shapes": "path_or_vertices_or_grid;field;triangles",
"result_shapes": "scalar",
"units": "field_unit_times_length_area_or_volume",
"complex_behavior": "real_and_complex",
"errors": "DimensionMismatch;InvalidGrid",
"arguments": [
"geometry",
"field",
"connectivity",
"options"
],
"argument_descriptors": [
{
"name": "geometry",
"shape": "path_or_vertices_or_grid",
"source": "cell,range,column,scalar,option"
},
{
"name": "field",
"shape": "field",
"source": "cell,range,column,scalar,option"
},
{
"name": "connectivity",
"shape": "triangles",
"source": "cell,range,column,scalar,option"
},
{
"name": "options",
"shape": "action-specific",
"source": "cell,range,column,scalar,option"
}
],
"signature": "magnetics.integral.surface_flux(geometry, field, connectivity, options)",
"worksheet_example": "Apply magnetics.integral.surface_flux using Worksheet ranges A1:A20 and B1:B20; set action-specific operands in the guided dialog.",
"result_fields": [
"scalar"
],
"unit_behavior": "field_unit_times_length_area_or_volume"
}call
- Access
- Registered in the Python Job
- Arguments
family, action, a, b, c, options- Result
- Complete result from the original module through the existing typed transport. The module remains the source of the computation and its provenance.
- Purpose
- Invocation of the operation identified by family and action
gxtxt_api_call("MAGNETICS_API_v1", "call", args)Recorded result · call
Download the example script (ZIP).
Example operands preview
[
"circuit",
"reluctance",
{
"kind": "array",
"shape": [
1,
1
],
"real": [
1.0
]
},
{
"kind": "array",
"shape": [
1,
1
],
"real": [
0.01
]
},
{
"kind": "array",
"shape": [
1,
1
],
"real": [
1000
]
}
]Result preview
{
"value_real": 79577.47154594767,
"value_imaginary": 0.0,
"unit": "A/Wb"
}