3
$\begingroup$

I am trying to solve a system of equations for the panel method using complex functions. Mathematica would not even attempt to produce a solution for the bcs term even if I assume real values for $\Gamma$. Also, how do I assume that all values of the $\Gamma$ array are positive and real?

$Assumptions = Γ[1] ∈ Reals;
n = 1;
Ξu[ζ_] := ζ;
Ξv[θ_, R_, ζ_, ζ0_] := (-I)*Sum[Γ[k]*Log[ζ - ((k - 0.75)/n)*R*Exp[I*θ] - ζ0], {k, 1, n}]; 
dΞ[ζ_] := Evaluate[D[Ξu[ζ] + Ξv[θ, R, ζ, ζ0], ζ]]; 
dΞcl[j_] = dΞ[(j - 0.25)/n R Exp[I θ] - ζ0];
bc[j_] := Evaluate[Re[dΞcl[j]] Sin[θ] - Im[dΞcl[j]] Cos[θ]] == 0;
bcs = With[{θ = 0.1, R = 1, ζ0 = 0}, Evaluate[Array[bc, n]]]

Solve[bcs]

results

$\endgroup$
  • 4
    $\begingroup$ Please share the code in copyable form, so that other users can play with it. No one wants to retype all this code (and double check for correct transition). This will raise your chances for getting quick and competent help. $\endgroup$ – Henrik Schumacher Jun 1 '18 at 17:52
  • $\begingroup$ Welcome Ali! To make the most of Mma.SE start by taking the tour now. It will help us to help you if you write an excellent question. Edit if improvable, show due diligence, give brief context, include minimal working example of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. $\endgroup$ – rhermans Jun 1 '18 at 18:46
4
$\begingroup$
n = 3;
$Assumptions = (Γ /@ Range[n]) ∈ Reals;

Ξu[ζ_] = ζ;
Ξv[θ_, R_, ζ_, ζ0_] := (-I)*Sum[Γ[k]*
     Log[ζ - ((k - 3/4)/n)*R*Exp[I*θ] - ζ0], {k, 1, n}];
dΞ[ζ_] := Evaluate[D[Ξu[ζ] + Ξv[θ, R, ζ, ζ0], ζ]];
dΞcl[j_] = dΞ[(j - 1/4)/n R Exp[I θ] - ζ0];
bc[j_] := Evaluate[Re[dΞcl[j]] Sin[θ] - Im[dΞcl[j]] Cos[θ]] == 0;
bcs = Array[bc, n] /. {θ -> 1/10, R -> 1, ζ0 -> 0} // FullSimplify;

sol = Solve[bcs, Evaluate[Γ /@ Range[n]]]

(* {{Γ[1] -> -(5/16) Sec[1/5] Sin[1/10], 
     Γ[2] -> -(1/8) Sec[1/5] Sin[1/10], 
     Γ[3] -> -(1/16) Sec[1/5] Sin[1/10]}} *)

Verifying solution

And @@ (bcs /. sol[[1]])

(* True *)

EDIT:

sol /. (x_ -> y_) :> x -> N[y]

{{Γ[1] -> -0.0318325, Γ[2] -> -0.012733, Γ[3] -> -0.00636649}}

Note that there are no positive solutions.

To assume that all Γ are positive (and hence real)

$Assumptions = Thread[Γ /@ Range[n] > 0]

(* {Γ[1] > 0, Γ[2] > 0, Γ[3] > 0} *)
$\endgroup$
  • $\begingroup$ I think fixing the boundary conditions will give the correct sign for gamma values, but getting the solution to work is good enough for now. Thank you! $\endgroup$ – Ali Shanoon Jun 2 '18 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.