How can this code be written less redundant?
if lin
@parameters a=eq.a_bar b=eq.b_bar
eqs = [D(ω) ~ (Pr - Pg) / (J * ω),
D(Uest) ~ Ku * e_p,
r_ω ~ Uest * λnom / R,
e_ω ~ r_ω - ω,
e_p ~ Pg - Pr_est + J * D(ω) * ω,
λest ~ ω * R / Uest,
Pr_est ~ 0.5 * ρ * A * Uest^3 * Γest * (a*λest + b),
λ ~ ω * R/U,
Pr ~ 0.5 * ρ * A * U^3 * Γ * (a*λ + b),
Pg ~ Pgc + Pge]
else
eqs = [D(ω) ~ (Pr - Pg) / (J * ω),
D(Uest) ~ Ku * e_p,
r_ω ~ Uest * λnom / R,
e_ω ~ r_ω - ω,
e_p ~ Pg - Pr_est + J * D(ω) * ω,
λest ~ ω * R / Uest,
Pr_est ~ 0.5 * ρ * A * Uest^3 * Γest * Cp(λest),
λ ~ ω * R/U,
Pr ~ 0.5 * ρ * A * U^3 * Γ * Cp(λ),
Pg ~ Pgc + Pge]
end