Closed mjfwest closed 1 year ago
In python, the yaml-file is a dictionary. By using the syntax
m230-35: Electric Conductivity: 1.37e+6 # 20°C H-B Curve : Variable: "dummy" Cubic: 'Monotone' include: 'HB'
with the colons in the definition of the H-B Curve you created a second dictionary inside the on with the material data - which is dumped as a string into the sif-file by pyelmer. Therefore you get
H-B Curve = {'Variable': 'dummy', 'Cubic': 'Monotone', 'include': 'HB'}
which is the second dictionary.
To get the desired output you need a string instead of a dictionary. As Elmer doesn't allow for the text to be in the same line, you need to use a multiline yaml-string. I'd suggest to use the pipe '|' symbol:
m230-35:
Electric Conductivity: 1.37e+6 # 20°C
H-B Curve: |
Variable "dummy"
Cubic 'Monotone'
include 'HB'
You could add some additional spaces in front of "Cubic 'Monotone'" and "include 'HB'" to get a nice-looking sif-file.
I'm trying to work out how one should define a nonlinear BH curve for a MagnetoDynamics2D simulation. I think the SIF file I should end up with should look like:
I've tried as yml file
which results in: