Group Abstract Group Abstract

Message Boards Message Boards

Questions about NDSolve with Dirichlet/Neumann bcs and direct formulations

Attachments:
POSTED BY: Lars Ulke-Winter
2 Replies

Thank you very much for the answer, but what does this mean in this code example:

pde = {-(1050000/13) D[u[x, y, z], z, z] - 
    1050000/13 D[u[x, y, z], y, y] - 2625000/13 D[w[x, y, z], x, z] - 
    2625000/13 D[ v[x, y, z], x, y] - 
    3675000/13 D[u[x, y, z], x, x] == 
   0, -(1050000/13) D[v[x, y, z], z, z] - 
    2625000/13 D[w[x, y, z], y, z] - 3675000/13 D[v[x, y, z], y, y] - 
    2625000/13 D[u[x, y, z], x, y] - 1050000/13 D[v[x, y, z], x, x] ==
    0,
  -(3675000/13) D[ w[x, y, z], z, z] - 
    2625000/13 D[v[x, y, z], y, z] - 1050000/13 D[w[x, y, z], y, y] - 
    2625000/13 D[u[x, y, z], x, z] - 1050000/13 D[w[x, y, z], x, x] ==
    0}

bcs =
 (* 3 Dirichtlet bcs *)
 {u[50, y, z] == 0,
  v[x, 0, z] == 0,
  w[x, y, 70] == 0,
  (* 9 Neumann bcs*)
  (D[u[x, y, z], y] + D[v[x, y, z], x] == 0) /. {y -> 50},
  (3 D[w[x, y,] + 7 D[v[x, y, z], y] + 3 D[u[x, y, z], x] == 
     0) /. {y -> 50},
  (D[v[x, y, z], z] + D[w[x, y, z], y] == 0) /. {y -> 50},
  (3 D[w[x, y, z], z] + 3 D[v[x, y, z], y] + 7 D[u[x, y, z], x] == 
     0) /. {x -> 0},
  (D[u[x, y, z], y] + D[v[x, y, z], x] == 0) /. {x -> 0},
  (D[u[x, y, z], z] + D[w[x, y, z], x] == 0) /. {x -> 0},
  (D[u[x, y, z], z] + D[w[x, y, z], x] == 0) /. {z -> 0},
  (D[v[x, y, z], z] + D[w[x, y, z], y] == 0) /. {z -> 0},
  (10500 D[w[x, y, z], z] + 4500 D[v[x, y, z], y] + 
      4500 D[u[x, y, z], x] == 13) /. z -> 0}

NDSolveValue[{pde, bcs}, {u, v, w}, {x, 0, 50}, {y, 0, 50}, {z, 0, 
  70}]

I don't understand the error message here (it is not a Dirichlet boundary condition): Error Message

Attachments:
POSTED BY: Lars Ulke-Winter
Anonymous User
Anonymous User
Posted 5 years ago

I did not do the whole problem due to time constraint. However I've had similar experiences with NDSolve and my input.

You state you have a correct solution "without using Active operator". I ask you to read the Mathematica's book about how expressions are evaluated (ie, in what order).

When NDSolve begins, some your input is "analyized" and it's parts labeled. But NDSolve must analyze your input to set up the solution. Therefore un-evaluated expressions that happen latently will not be detected by the algorithm which tries to "parse" the input expressions to know what is asked to be solved. It will end up not knowing the full problem or having false lablels inside the problem.

Example - if there are rules -> to evaluate, evaluate them before hand and assign them to variable "pde" so that NDSolve has "the actual problem being solved" laid out for it.

You'll find some "built-in" functions react well to being handed unsolved symbolic expressions, but that other "built-in" use "Hold" on the input and do not evaluate the input before attempting to decipher it. The behavior of analyzing function input is not "exactly the same across all functions".

Write a function of your own that analyzes input for the purpose of solving, and you will quickly see what a problem it would be to analyze input that is not yet itself evaluated. Yet for NDSolve, there is some input that should not be "evaluated by kernel" before it begins it's analysis.

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