Mathematica Asked by Masmoudi Omar on May 4, 2021
I am new to Mathematica and I need to solve a system of coupled ODE and PDE with two variables (space and time) and one of the parameters is only dependent on the space.
The set of partial differential equation in y(z,t) and q(z,t) to solve are Eq 1 and Eq 2
wf is only dependent on the space and constant with respect to time.
The code I have written is as follows:
ClearAll[y, q, wf]
[Gamma] = Cd/4 Pi St; c = 3; M =
CL0/16 Pi^2 St^2 [Mu]; [Epsilon] = 0.3; A = 12; St = 0.16; Cd =
1.2; CL0 = 0.3; [Mu] = 1.785 ; [CapitalLambda] = 100;
System = {
wf[z, t] == 2*z + 10,
D[y[z, t], t, t] + ([Gamma] wf[z, t]/[Mu])*D[y[z, t], t] -
c^2*D[y[z, t], z, z] == wf[z, t]^2 M q[z, t],
D[q[z, t], t, t] + [Epsilon]*wf[z, t]*(q[z, t]^2 - 1)*
D[q[z, t], t] + q[z, t]*wf[z, t]^2 == A D[y[z, t], t, t],
y[0, t] == 0 ,
y[[CapitalLambda], t] == 0,
q[z, 0] == 10^-3,
y[z, 0] == 0,
D[y[z, t], t] == 0 /. t -> 0,
D[y[z, t], z] == 0 /. z -> 0,
D[q[z, t], t] == 0 /. t -> 0
};
{y, q, wf} =
NDSolveValue[
System, {y, q, wf}, {z, 0, [CapitalLambda]}, {t, 0, 800}]
Plot3D[{y[z, t], q[z, t]}, {z, 0, [CapitalLambda]}, {t, 0, 800}]
PS: When Wf is set to 1 (as constant) the code ran fine. But with a spatial variable parameter it doesn’t.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP