Skip to content

Commit

Permalink
Port SVN r3646: updates to TInvDynamicVars.CalcGFMYprim (by davismont)
Browse files Browse the repository at this point in the history
Ref:
git-svn-id: https://svn.code.sf.net/p/electricdss/code/trunk@3646 d8739450-1e93-4ef4-a0af-c327d92816ff
  • Loading branch information
PMeira committed Sep 14, 2023
1 parent 50b3add commit f447ffe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Shared/InvDynamics.pas
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ procedure TInvDynamicVars.CalcGFMYprim(NPhases: Integer; YMatrix: PCMatrix);
R1,
// R2,
// X2,
X1R1,
X0R0,
Isc1,
Xs,
Rs,
Expand All @@ -260,13 +262,17 @@ procedure TInvDynamicVars.CalcGFMYprim(NPhases: Integer; YMatrix: PCMatrix);
R1 := X1 / 4; // Uses defaults
// R2 := R1; // default Z2 = Z1
// X2 := X1;
R0 := 1.9;
X0 := 5.7;
X1R1 := X1 / R1;
X0R0 := X0 / R0;
Isc1 := (mKVARating * 1000.0 / (sqrt(3) * RatedkVLL)) / NPhases;
// Compute R0, X0
a := 10;
b := (4.0 * (R1 + X1 * 3));
b := (4.0 * (R1 + (X1 * X0R0)));
c := (4.0 * (R1 * R1 + X1 * X1) - SQR((sqrt(3) * RatedkVLL * 1000.0) / Isc1));
R0 := QuadSolver(a, b, c);
X0 := R0 * 3;
X0 := R0 * X0R0;
// for Z matrix
Xs := (2.0 * X1 + X0) / 3.0;
Rs := (2.0 * R1 + R0) / 3.0;
Expand Down

0 comments on commit f447ffe

Please sign in to comment.