Magnetics: B–H Loops and Curves
Analyze B–H loops to calculate area, remanence, coercivity, and permeability. Preserve sample order for loop calculations.
Branches, loop closure, and crossings
Keep the samples in loop order when calculating the enclosed area. Remanence and coercivity use interpolation at the H=0 and B=0 crossings, respectively. For incremental permeability, choose one branch with distinct H values, set bias_h, and choose a positive delta_h that keeps both endpoints within the domain. The closed-loop integral is reported in J/m³.
Operation reference
Jump to an operation
No matching operations.
bh.loop_area
A is H in A/m and operand B is the magnetic flux density in T. The operation closes the loop for integration and returns the absolute area in J/m³.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Area enclosed by the B–H loop
gxtxt_api_call("MAGNETICS_API_v1", "bh.loop_area", args)Recorded result · bh.loop_area
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"area": 0.6500000000000008,
"unit": "J/m^3"
}bh.remanence
Interpolate B at the H=0 crossings. Keep both branches to see their distinct remanent values.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Remanent flux density at zero H
gxtxt_api_call("MAGNETICS_API_v1", "bh.remanence", args)Recorded result · bh.remanence
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"values": {
"dtype": "float64",
"shape": [
4,
1
],
"values": [
0.09999999999999998,
0.1,
-0.09999999999999998,
-0.1
]
},
"unit": "T"
}bh.coercivity
Interpolate H at the B=0 crossings. The result column is in A/m.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Coercive field at zero B
gxtxt_api_call("MAGNETICS_API_v1", "bh.coercivity", args)Recorded result · bh.coercivity
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"values": {
"dtype": "float64",
"shape": [
2,
1
],
"values": [
-0.4444444444444444,
0.4444444444444444
]
},
"unit": "A/m"
}bh.differential_permeability
Estimate dB/dH with A=H and operand B equal to the flux density. Consecutive H samples must differ for the derivative to be defined.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Differential permeability dB/dH
gxtxt_api_call("MAGNETICS_API_v1", "bh.differential_permeability", args)Recorded result · bh.differential_permeability
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"value": {
"dtype": "float64",
"shape": [
9,
1
],
"values": [
0.11666666666666665,
0.15999999999999998,
0.1875,
0.12,
-Infinity,
0.15999999999999998,
0.1875,
0.12,
0.09999999999999998
]
},
"unit": "H/m"
}bh.saturation_indicator
The indicator reports the observed maxima of |B| and |H| in the series.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Magnetic saturation indicator
gxtxt_api_call("MAGNETICS_API_v1", "bh.saturation_indicator", args)Recorded result · bh.saturation_indicator
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"maximum_abs_B": 0.7,
"maximum_abs_H": 5.0,
"unit_B": "T",
"unit_H": "A/m"
}bh.incremental_permeability
Supply A=H and flux density in operand B on one branch with distinct H values. Set bias_h and delta_h. The centered difference uses values interpolated at the two endpoints within the domain.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Incremental permeability over a finite interval around a bias field
gxtxt_api_call("MAGNETICS_API_v1", "bh.incremental_permeability", args)Recorded result · bh.incremental_permeability
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0
]
},
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-0.7,
-0.31,
0.0,
0.31,
0.7
]
},
{
"kind": "empty"
},
{
"kind": "struct",
"fields": {
"bias_h": {
"kind": "array",
"shape": [
1,
1
],
"real": [
0.0
]
},
"delta_h": {
"kind": "array",
"shape": [
1,
1
],
"real": [
2.0
]
}
}
}
]Result preview
{
"value": 0.155,
"unit": "H/m"
}Rejected input or attempted run · bh.incremental_permeability:extrapolation
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0
]
},
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-0.7,
-0.31,
0.0,
0.31,
0.7
]
},
{
"kind": "empty"
},
{
"kind": "struct",
"fields": {
"bias_h": {
"kind": "array",
"shape": [
1,
1
],
"real": [
5.0
]
},
"delta_h": {
"kind": "array",
"shape": [
1,
1
],
"real": [
2.0
]
}
}
}
]Result preview
"GXTXT:ScriptBridge:RemoteError: MAGNETICS_API_v1/bh.incremental_permeability: incremental interval outside B-H curve"
bh.interpolate
Supply A=H and flux density in operand B. C contains the query values of H. Set method, which defaults to pchip. The H samples must be distinct and the queries must lie within the interpolation domain.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Interpolation of a measured monotonic B–H curve
gxtxt_api_call("MAGNETICS_API_v1", "bh.interpolate", args)Recorded result · bh.interpolate
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0
]
},
{
"kind": "array",
"shape": [
5,
1
],
"real": [
-0.7,
-0.31,
0.0,
0.31,
0.7
]
},
{
"kind": "array",
"shape": [
2,
1
],
"real": [
0.5,
1.5
]
}
]Result preview
{
"B": {
"dtype": "float64",
"shape": [
2,
1
],
"values": [
0.07869669117647059,
0.23609007352941175
]
},
"unit": "T"
}bh.cycle_align
Rotate the samples so the sequence starts at the maximum H. The operation preserves the circular order and reports the starting index.
- Access
- Registered in the Python Job
- Arguments
- Typed operands a, b, and c, with an optional typed options struct.
- Shape
- Real vectors of matching shape
(matching_real_vectors) - Units
- T, A/m, J/m³, H/m
- Result
- Numerical and diagnostic fields
- Purpose
- Circular rotation of samples to start at the maximum H
gxtxt_api_call("MAGNETICS_API_v1", "bh.cycle_align", args)Recorded result · bh.cycle_align
Download the example script (ZIP).
Example operands preview
[
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-5.0,
-2.0,
0.0,
2.0,
5.0,
2.0,
0.0,
-2.0,
-5.0
]
},
{
"kind": "array",
"shape": [
9,
1
],
"real": [
-0.7,
-0.35,
0.1,
0.4,
0.7,
0.35,
-0.1,
-0.4,
-0.7
]
},
{
"kind": "empty"
}
]Result preview
{
"H": {
"dtype": "float64",
"shape": [
9,
1
],
"values": [
5.0,
2.0,
0.0,
-2.0,
-5.0,
-5.0,
-2.0,
0.0,
2.0
]
},
"B": {
"dtype": "float64",
"shape": [
9,
1
],
"values": [
0.7,
0.35,
-0.1,
-0.4,
-0.7,
-0.7,
-0.35,
0.1,
0.4
]
},
"start_index": 5.0
}