Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ac1ph_DC inductor allows unphysical parameters #34

Open
ceraolo opened this issue Feb 19, 2017 · 0 comments
Open

Ac1ph_DC inductor allows unphysical parameters #34

ceraolo opened this issue Feb 19, 2017 · 0 comments

Comments

@ceraolo
Copy link

ceraolo commented Feb 19, 2017

Consider AC1ph_DC.Impedances.Inductor.
The inductor reactance is entered as a 2x2 matrix, containing [xs[1],xm; xm,xs[2]]
This matrix is directly accessible through the parameter dialog box. This implies that the user can use a matrix having the four values all different from each-other, which, AFAIK, is unrealistic, since the matrix should be symmetric.
I propose the change the code into the following one:

model Inductor "Inductor with series resistor, 1-phase"
  extends Partials.ImpedBase;

  parameter Types.Generic.Resistance[2] r={0,0} "resistance";
  parameter Types.Generic.Reactance[2] xs={1,1} "self reactances";
  parameter Types.Generic.Reactance xm=0 
    "mutual reactance between conds 1 and 2";
protected 
  final parameter Real[2] RL_base=Utilities.Precalculation.baseRL(
      puUnits,
      V_nom,
      S_nom,
      2*pi*f_nom);
  final parameter SI.Resistance[2] R=r*RL_base[1];
  //  final parameter SI.Inductance[2, 2] L=x*RL_base[2];
  final parameter SI.Inductance[2, 2] L=[xs[1], xm; xm, xs[2]]*RL_base[2];

initial equation 
  if dynType == Types.Dynamics.SteadyInitial then
    der(i) = zeros(2);
  elseif dynType == Types.Dynamics.FixedInitial then
    i = i_start;
  end if;

equation 
  L*der(i) + diagonal(R)*i = v;
end Inductor;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant