Message Boards Message Boards

0
|
8816 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Finite element method

Posted 9 years ago

I have tried NDSOLVE with FEM but i didnt able to solve kindly anybody rectify the error

Attachments:
POSTED BY: Vijay Babu
3 Replies
Posted 9 years ago

Thank you sir.Really great helpful for me. i got idea sure i will try

POSTED BY: Vijay Babu

There are three problems.

(1) Mathematica is case-sensitive. You need to replace i with I to get the imaginary unit.

(2) You need to add initial conditions.

(3) The built in methods will not handle complex values. So you will need to split into two sets of variables and equations to represent real and imaginary parts as both being explicitly real.

If you were to replace the complex exponentials by cosines then the variant below will run just fine.

Eqn1 = (1/4)*D[u[x, t], t] - (1 + \[Epsilon]*A*Cos[\[Omega]t])*
     D[u[x, t], x] == 
   Gr* \[Theta][x, t] + Gc *CC[x, t] + 
    D[u[x, t], x, x] - (M + 1/B)*u[x, t];
Eqn2 = (1/4)*
     D[\[Theta][x, t], 
      t] - (1 + \[Epsilon]*A*Cos[\[Omega]t]) D[\[Theta][x, t], 
      x] == (1/Pr) D[\[Theta][x, t], x, x];
Eqn3 = (1/4)*D[CC[x, t], t] - (1 + \[Epsilon]*A*Cos[\[Omega]t])*
     D[CC[x, t], x] == (1/Sc) *D[CC[x, t], x, x] - Kr*CC[x, t];
BC1 = u[0, t] == 0;
BC2 = u[inf1, t] == 0;
BC3 = \[Theta][0, t] == 1 + \[Epsilon]*Cos[\[Omega]t];
BC4 = \[Theta][inf1, t] == 0;
BC5 = CC[0, t] == 1;
BC6 = CC[inf1, t] == 0;
ic1 = u[x, 0] == 1;
ic2 = \[Theta][x, 0] == 2.2;
ic3 = CC[x, 0] == x;
inf1 = 5;
param1 = {Gr -> 0.1, Gc -> 0.1, Pr -> 0.71, Sc -> 0.22, 
   Gc -> 0.1, \[Epsilon] -> 0.001 ,  M -> 0.1, A -> 0.1, B -> 0.1, 
   Kr -> 0.1, \[Omega]t -> \[Pi]/4};

Sol1 = NDSolve[{Eqn1, Eqn2, Eqn3, BC1, BC2, BC3, BC4, BC5, BC6} /. 
   param1, {u, \[Theta], CC}, {t, 0, 8}, {x, 0, 5}, 
  Method -> {"PDEDiscretization" -> {"MethodOfLines", 
      "SpatialDiscretization" -> {"FiniteElement"}}}]

I realize this alters the problem but it should give an idea of what is needed in order to get the example to run.

POSTED BY: Daniel Lichtblau
Posted 9 years ago

i would like to solve PDE equations using FEM thats why i have formatted these code sir .After your correction also i am getting the same error. Like NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >>

POSTED BY: Vijay Babu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract