Page 1 of 1
Interpolation Method for H-B Curve
Posted: 05 Jul 2016, 16:20
by Bavragor
Hi Elmer-users,
Did anyone know how the H-B curve for a nonlinear electromagnetic steel is interpolated during the calculation?
I use the the method which is described in:
https://github.com/ElmerCSC/elmerfem/bl ... h/case.sif
Code: Select all
H-B Curve(31,2) = Real
INCLUDE HB
Thank you in advance!
Bavragor
Re: Interpolation Method for H-B Curve
Posted: 05 Jul 2016, 16:46
by raback
Hi Bavragor
The default interpolation method is linear interpolation between points (x_i,y_i) - and extrapolation if the value of x is beyond the interval. All this applies to all keywords that may vary, not just the H-B curve.
I would personally use the following syntax with "End" that frees from the agony of having to know the size.
Code: Select all
H-B Curve = Variable "dummy"
Real
include HB
End
Linear interpolation is not always optimal. For this purpose "cubic" spline interpolation may be requested. It ensures continuity of derivaties as well.
Code: Select all
H-B Curve = Variable "dummy"
Real Cubic
include HB
End
For poor data the spline could at times give negative dH/dB. For this purpose there the user may request the fitting to be monotonic:
Code: Select all
H-B Curve = Variable "dummy"
Real Cubic Monotone
include HB
End
To my knowledge this is the choice for most production runs involving H-B curves.
-Peter
Re: Interpolation Method for H-B Curve
Posted: 05 Jul 2016, 16:56
by Bavragor
Thank you very much for the quick reply Peter
That is very helpful, in fact more than I expected
Re: Interpolation Method for H-B Curve
Posted: 05 Jul 2016, 17:02
by Bavragor
Another question: is it possible to print that interpolated curves in Elmer or in the postprocessor? (paraview would be nice)
Re: Interpolation Method for H-B Curve
Posted: 05 Jul 2016, 17:28
by raback
Hi
There is an undocumented solver: SaveDependence. You could perhaps try it. Looking at the code the syntax could be something like:
Code: Select all
Solver solver_id
Name = "SaveDep"
Procedure = "SaveData" "SaveDependence"
Filename = dep.dat
Lower Limit = Real 0.0
Upper Limit = Real 100.0
Number of Points = Integer 100
Expression 1 = Real ...
Expression 2 = Real ...
End
I wrote it sometimes just for debugging purposes so it is far from perfect. In your case you should copy your expression of H-B curve to be "Expression 1" etc. Perhaps you could give feedback if this works...
-Peter
Re: Interpolation Method for H-B Curve
Posted: 25 Jul 2016, 16:43
by Bavragor
Hi Peter,
I tried it and it's excactly what i needed! Thx
Code example:
Code: Select all
Solver 6
Name = "SaveDep"
Procedure = "SaveData" "SaveDependence"
Filename = dep.dat
Lower Limit = Real 0.0
Upper Limit = Real 1.5
Number of Points = Integer 100
Expression 1 = Variable "dummy"
Real Cubic
include HB
End
End