Home
last modified time | relevance | path

Searched refs:Pmax (Results 1 – 16 of 16) sorted by relevance

/petsc/src/ts/tutorials/power_grid/
H A Dex3.h10 PetscScalar H, D, omega_b, omega_s, Pmax, Pmax_ini, Pm, E, V, X, u_s, c; member
41 if (forwardsolve) user->Pmax = 0.0; /* Apply disturbance - this is done by setting Pmax = 0 */ in PostEventFunction()
42 else user->Pmax = user->Pmax_ini; /* Going backward, reversal of event */ in PostEventFunction()
44 …if (forwardsolve) user->Pmax = user->Pmax_ini; /* Remove the fault - this is done by setting Pmax… in PostEventFunction()
45 else user->Pmax = 0.0; /* Going backward, reversal of event */ in PostEventFunction()
56 PetscScalar *f, Pmax; in RHSFunction() local
63 Pmax = ctx->Pmax; in RHSFunction()
65 …f[1] = ctx->omega_s / (2.0 * ctx->H) * (ctx->Pm - Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - c… in RHSFunction()
78 PetscScalar J[2][2], Pmax; in RHSJacobian() local
83 Pmax = ctx->Pmax; in RHSJacobian()
[all …]
H A Dex2.c34 PetscScalar H, D, omega_s, Pmax, Pm, E, V, X; member
43 PetscScalar *f, Pmax; in IFunction() local
51 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in IFunction()
52 else if (t >= ctx->tcl) Pmax = ctx->E / 0.745; in IFunction()
53 else Pmax = ctx->Pmax; in IFunction()
55 f[1] = 2.0 * ctx->H * udot[1] + Pmax * PetscSinScalar(u[0]) + ctx->D * (u[1] - 1.0) - ctx->Pm; in IFunction()
69 PetscScalar J[2][2], Pmax; in IJacobian() local
75 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in IJacobian()
76 else if (t >= ctx->tcl) Pmax = ctx->E / 0.745; in IJacobian()
77 else Pmax = ctx->Pmax; in IJacobian()
[all …]
H A Dex9.c34 PetscScalar H, D, omega_b, omega_s, Pmax, Pm, E, V, X; member
44 PetscScalar *f, Pmax; in RHSFunction() local
50 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
51 else Pmax = ctx->Pmax; in RHSFunction()
54 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
67 PetscScalar J[2][2], Pmax; in RHSJacobian() local
72 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
73 else Pmax = ctx->Pmax; in RHSJacobian()
78 J[1][0] = -Pmax * PetscCosScalar(u[0]) * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
137 ctx.Pmax = ctx.E * ctx.V / ctx.X; in main()
[all …]
H A Dex9adj.c34 PetscScalar H, D, omega_b, omega_s, Pmax, Pm, E, V, X, u_s, c; member
59 PetscScalar *f, Pmax; in RHSFunction() local
66 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
67 else Pmax = ctx->Pmax; in RHSFunction()
70 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
83 PetscScalar J[2][2], Pmax; in RHSJacobian() local
88 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
89 else Pmax = ctx->Pmax; in RHSJacobian()
94 J[1][0] = -Pmax * PetscCosScalar(u[0]) * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
170 …sensip = 1. / PetscSqrtScalar(1. - (ctx->Pm / ctx->Pmax) * (ctx->Pm / ctx->Pmax)) / ctx->Pmax * x[… in ComputeSensiP()
[all …]
H A Dex9opt.c36 PetscScalar H, D, omega_b, omega_s, Pmax, Pm, E, V, X, u_s, c; member
49 PetscScalar *f, Pmax; in RHSFunction() local
56 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSFunction()
57 else Pmax = ctx->Pmax; in RHSFunction()
60 …f[1] = (-Pmax * PetscSinScalar(u[0]) - ctx->D * (u[1] - ctx->omega_s) + ctx->Pm) * ctx->omega_s / … in RHSFunction()
73 PetscScalar J[2][2], Pmax; in RHSJacobian() local
78 …if ((t > ctx->tf) && (t < ctx->tcl)) Pmax = 0.0; /* A short-circuit on the generator terminal that… in RHSJacobian()
79 else Pmax = ctx->Pmax; in RHSJacobian()
84 J[1][0] = -Pmax * PetscCosScalar(u[0]) * ctx->omega_s / (2.0 * ctx->H); in RHSJacobian()
160 …sensip = 1. / PetscSqrtScalar(1. - (ctx->Pm / ctx->Pmax) * (ctx->Pm / ctx->Pmax)) / ctx->Pmax * x[… in ComputeSensiP()
[all …]
H A Dex3.c81 ctx.Pmax = ctx.E * ctx.V / ctx.X; in main()
82 ctx.Pmax_ini = ctx.Pmax; in main()
83 PetscCall(PetscOptionsScalar("-Pmax", "", "", ctx.Pmax, &ctx.Pmax, NULL)); in main()
97 u[0] = PetscAsinScalar(ctx.Pm / ctx.Pmax); in main()
147 u[0] = PetscAsinScalar(ctx.Pm / ctx.Pmax); in main()
H A Dex3sa.c87 ctx.Pmax = ctx.E * ctx.V / ctx.X; in main()
88 ctx.Pmax_ini = ctx.Pmax; in main()
89 PetscCall(PetscOptionsScalar("-Pmax", "", "", ctx.Pmax, &ctx.Pmax, NULL)); in main()
103 u[0] = PetscAsinScalar(ctx.Pm / ctx.Pmax); in main()
159 val[0] = 1. / PetscSqrtScalar(1. - (ctx.Pm / ctx.Pmax) * (ctx.Pm / ctx.Pmax)) / ctx.Pmax; in main()
185 u[0] = PetscAsinScalar(ctx.Pm / ctx.Pmax); in main()
H A Dex3opt.c81 ctx.Pmax = ctx.E * ctx.V / ctx.X; in main()
82 ctx.Pmax_ini = ctx.Pmax; in main()
83 PetscCall(PetscOptionsScalar("-Pmax", "", "", ctx.Pmax, &ctx.Pmax, NULL)); in main()
255 u[0] = PetscAsinScalar(ctx->Pm / ctx->Pmax); in FormFunctionGradient()
284 val[0] = 1. / PetscSqrtScalar(1. - (ctx->Pm / ctx->Pmax) * (ctx->Pm / ctx->Pmax)) / ctx->Pmax; in FormFunctionGradient()
H A Dex3opt_fd.c81 ctx.Pmax = ctx.E * ctx.V / ctx.X; in main()
82 ctx.Pmax_ini = ctx.Pmax; in main()
83 PetscCall(PetscOptionsScalar("-Pmax", "", "", ctx.Pmax, &ctx.Pmax, NULL)); in main()
202 u[0] = PetscAsinScalar(ctx->Pm / ctx->Pmax); in FormFunction()
H A Dex8.c30 PetscScalar Pmax, Pmax_s; /* Maximum power output of generator */ member
130 …if ((t > user->tf) && (t < user->tcl)) user->Pmax = 0.0; /* A short-circuit that drives the electr… in PostStep()
131 else user->Pmax = user->Pmax_s; in PostStep()
160 user->PM_min = user->Pmax * PetscSinScalar(user->mux); in ini_bou()
193 …f = (user->ws / (2 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(x) - user->D * (y … in adv2()
304 …c3 = (user->ws / (2.0 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(xi) - use… in IJacobian()
346 user->Pmax = user->Pmax_s = 2.1; in Parameter_settings()
350 user->mux = PetscAsinScalar(user->PM_min / user->Pmax); in Parameter_settings()
366 PetscCall(PetscOptionsGetScalar(NULL, NULL, "-Pmax", &user->Pmax, &flg)); in Parameter_settings()
H A Dpetscopt_ex68 -Pmax 2.1
H A Dpetscopt_ex77 -Pmax 2.1
H A Dpetscopt_ex88 -Pmax 2.1
H A Dex7.c24 PetscScalar Pmax; /* Maximum power output of generator */ member
182 user->PM_min = user->Pmax * PetscSinScalar(mux); in ini_bou()
223 f = (user->ws / (2 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(x)); in adv2()
328 …c3 = (user->ws / (2.0 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(xi)) / us… in IJacobian()
369 user->Pmax = 2.1; in Parameter_settings()
373 user->mux = PetscAsinScalar(user->PM_min / user->Pmax); in Parameter_settings()
393 PetscCall(PetscOptionsGetScalar(NULL, NULL, "-Pmax", &user->Pmax, &flg)); in Parameter_settings()
H A Dex6.c23 PetscScalar Pmax; /* Maximum power output of generator */ member
206 f = (user->ws / (2 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(x)); in adv2()
228 fthetac = user->ws / (2 * user->H) * (user->PM_min - user->Pmax * PetscSinScalar(theta)); in BoundaryConditions()
337 fthetac = user->ws / (2 * user->H) * (user->PM_min - user->Pmax * PetscSinScalar(xi)); in IJacobian()
435 …c3 = (user->ws / (2.0 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(xi)) / (2 *… in IJacobian()
475 user->Pmax = 2.1; in Parameter_settings()
479 user->mux = PetscAsinScalar(user->PM_min / user->Pmax); in Parameter_settings()
493 PetscCall(PetscOptionsGetScalar(NULL, NULL, "-Pmax", &user->Pmax, &flg)); in Parameter_settings()
/petsc/src/snes/tutorials/network/power/
H A Dcase9.m30 % bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_1…