Message Boards Message Boards

Giving values of boundary conditions while solving a system of non-linear equations

Posted 5 months ago

I'm solving a system of non-linear equations using finite element method. while giving the values of boundary condition I'm getting the error. How I'm getting that I don't know.

screeenshot for boundary conditions

POSTED BY: Nithiya V
17 Replies

In bcs you have typed u[x,y]=0 instead of ==0.

POSTED BY: Gianluca Gorni
Posted 5 months ago

Thank you for your response Even now also I'm getting the same errorenter image description here

POSTED BY: Nithiya V
Posted 5 months ago

This is the problem I have to include this boundary condition cavity boundary condition

POSTED BY: Nithiya V

The first element of NeumannValue must be a value, not a predicate. Check your definitiopn of op, because it evaluates to False.

POSTED BY: Gianluca Gorni
Posted 5 months ago

I have checked again. Even though it's showing the same error.for reference I have attached

POSTED BY: Nithiya V
Posted 5 months ago

And I have given the Neumann value as zero for the top wall and y=1

POSTED BY: Nithiya V

op alreay contains the equation ==0, you do not need to write op=={0,0,0} again.

POSTED BY: Gianluca Gorni
Posted 5 months ago

I have made changes. Even though I'm getting error in the Neumann condition alone. Is it correct according to the diagram what I have given for the Neumann condition. enter image description here

POSTED BY: Nithiya V

In your definition of op you have u[x,y] but also u alone. You must make the independent variables explicit everywhere. NeumannValue is used inside a differential equation, not free-standing.

POSTED BY: Gianluca Gorni
Posted 5 months ago

how can I give that Neumann condition. I have searched in many things I got this only, kindly let me know how to define for that particular condition.

POSTED BY: Nithiya V

Sorry, I have no expertise on Neumann conditions. In the documentation I only see Neumann conditions for linear PDEs, but yours seems nonlinear.

It will be easier to help you if you include the actual code instead of a screenshot.

POSTED BY: Gianluca Gorni
Posted 5 months ago
Pr = 0.71; Ra = 10^4;

Needs["NDSolve`FEM`"]

\[CapitalOmega] = ImplicitRegion[True, {{x, 0, 1}, {y, 0, 1}}];
op = {D[u[x, y], x]+D[v[x, y], y] \[Equal] 0, u[x, y]*D[u[x, y], x]+v[x, y]*D[u[x, y], y]+ D[P, x]-Pr*(D[u[x, y], x, x]+D[u[x, y], y, y]) \[Equal] 0, u[x, y]*D[v[x, y], x]+v[x, y]*D[v[x, y], y]+D[P, y] Pr*(D[v[x, y], x, x]+D[v[x, y], y, y])+Ra*Pr*\[Theta][x, y] \[Equal] 0, u[x, y]*D[\[Theta][x, y], x]+v[x, y]*D[\[Theta][x, y], y]-D[\[Theta][x, y], x, x]-D[\[Theta][x, y], y, y] \[Equal] 0}

bcs = {DirichletCondition[{u[x, y] \[Equal] 0, v[x, y] \[Equal] 0, \[Theta][x, y] \[Equal] 0}, x \[Equal] 0], DirichletCondition[{u[x, y] \[Equal] 0, v[x, y] \[Equal] 0, \[Theta][x, y] \[Equal] 1}, y \[Equal] 0], DirichletCondition[{u[x, y] \[Equal] 0, v[x, y] \[Equal] 0, \[Theta][x, y] \[Equal] 0}, x \[Equal] 1]}

NDSolveValue[{op, bcs}, {u, v, \[Theta], P}, {x, y} \[Element] \[CapitalOmega], Method -> {"FiniteElement"}]
POSTED BY: Nithiya V

What is D[P, x]?

POSTED BY: Gianluca Gorni
Posted 5 months ago

P is a pressure term that is also function of x,y i haven't mention that in explicit form

POSTED BY: Nithiya V
Posted 5 months ago

Now, do you get any idea about the Neumann boundary conditions. Till now I'm getting error.

POSTED BY: Nithiya V

I would write the region more simply as

\[CapitalOmega] = Rectangle[];

I get the error that op has four equations with only three unknown functions.

Sorry, I can't help you with the Neumann condition.

POSTED BY: Gianluca Gorni
Posted 5 months ago

Thank you for reply.

POSTED BY: Nithiya V
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