Skip to content

Commit

Permalink
Remove incorrect unit-casting.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Oct 31, 2022
1 parent f325ed3 commit 29886c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -13,15 +13,15 @@ model GenericHystTellinenHard
protected
final parameter SI.MagneticFluxDensity eps = Br/1000;
//final parameter Real mu0(final unit="N/A2") = K*mu_0;
final parameter SI.MagneticFieldStrength H0= 0.5*log((1+mu0*Hc/Br)/(1-mu0*Hc/Br)) + M*Hc;
final parameter Real H0= 0.5*log((1+mu0*Hc/Br)/(1-mu0*Hc/Br)) + M*Hc;
constant SI.MagneticFieldStrength unitH = 1;

Real tanhR;
Real tanhF;

equation
tanhR = tanh((M*H - H0)/unitH);
tanhF = tanh((M*H + H0)/unitH);
tanhR = tanh(M*H - H0);
tanhF = tanh(M*H + H0);
hystR = Br*tanhR + mu0*H - eps/2;
hystF = Br*tanhF + mu0*H + eps/2;

Expand Down
Expand Up @@ -17,8 +17,8 @@ protected
constant SI.MagneticFieldStrength unitH = 1;

equation
hystR = Js*tanh((M*Hstat - H0)/unitH) + mu0*Hstat - eps/2;
hystF = Js*tanh((M*Hstat + H0)/unitH) + mu0*Hstat + eps/2;
hystR = Js*tanh(M*Hstat - H0) + mu0*Hstat - eps/2;
hystF = Js*tanh(M*Hstat + H0) + mu0*Hstat + eps/2;

annotation (defaultComponentName="core", Documentation(info="<html>
<p>Flux tube element for modeling soft magnetic materials with ferromagnetic and dynamic hysteresis (eddy currents). The ferromagnetic hysteresis behavior is defined by the <a href=\"modelica://Modelica.Magnetic.FluxTubes.UsersGuide.Hysteresis.StaticHysteresis.Tellinen\">Tellinen hysteresis model</a>. The shape of the limiting hysteresis loop (see Fig. 1) is described by simple hyperbolic tangent functions with 4 parameters. Therefore, the hysteresis shape variety is limited but the parameterization of the model is very simple and the model is relatively fast and robust. The rising (hyst<sub>R</sub>) and falling (hyst<sub>F</sub>) branches of the limiting hysteresis loop are defined by the following equations.</p>
Expand Down

0 comments on commit 29886c3

Please sign in to comment.