Interpolation Method for H-B Curve

Numerical methods and mathematical models of Elmer
Post Reply
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Interpolation Method for H-B Curve

Post 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
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Interpolation Method for H-B Curve

Post 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
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Interpolation Method for H-B Curve

Post by Bavragor »

Thank you very much for the quick reply Peter :)

That is very helpful, in fact more than I expected
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Interpolation Method for H-B Curve

Post by Bavragor »

Another question: is it possible to print that interpolated curves in Elmer or in the postprocessor? (paraview would be nice)
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Interpolation Method for H-B Curve

Post 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
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Interpolation Method for H-B Curve

Post 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 
Post Reply