CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

nonlinear equation with non-constant (nonlinear) and direction dependent diffusion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 28, 2013, 12:50
Question nonlinear equation with non-constant (nonlinear) and direction dependent diffusion
  #1
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 129
Rep Power: 8
ziemowitzima is on a distinguished road
Dear Foamers,

I am trying to solve/implement nonlinear equation with non-constant (nonlinear) and direction dependent diffusion.
It looks like that:

Equation is solved for y in rectangular (u,z) domain:
\frac{\partial y}{\partial t} + \frac{\partial  \psi}{\partial z}  =  \frac{\partial^2 y}{\partial z^2} +  \left[ \frac{1+(\frac{\partial  y}{\partial z})^2}{(\frac{\partial y}{\partial  u})^2}\right]  \frac{\partial^2 y}{\partial u^2}
 - 2 \left[ \frac{\frac{\partial y}{\partial z}}{\frac{\partial  y}{\partial u}}\right] \frac{\partial^2 y}{\partial z \partial u}

I decided to solve it as follows:

fvScalarMatrix yEqn
(
fvm::ddt(y)
- U.component(1)
- fvm::laplacian(nu + (A/C)*nu2, y)
+ D/C
);

where:
nu and nu2 are defined to act in z and u directions respectively
nu = (1 0 0 0 0 0 0 0 0) and nu2 = (0 0 0 0 1 0 0 0 0 0),
and
A = 1+\left(\frac{\partial y}{\partial z}\right)^2
C = \left(\frac{\partial y}{\partial  u}\right)^2
and
D = 2 \left[ \frac{\partial y}{\partial z}\frac{\partial  y}{\partial u}\right] \frac{\partial^2 y}{\partial z \partial u}
and
v = -\frac{\partial  \psi}{\partial z}, (vertical velocity)
where A, C and D are solved explicitly.
But solver had a problem with it, because C were getting too large.

So I decided to multiply above equation by C and get:

fvScalarMatrix yEqn
(
C*fvm::ddt(y)
- C*U.component(1)
- fvm::laplacian(C*nu + A*nu2, y)
+ D
);

Here I got solution, somehow similar to the one it should converge, but not exactly.
Problem seems to be in "C*fvm::ddt(y)" term, because it gives me the same answer if I have just "fvm::ddt(y)" ...

Any idea, what can be here wrong, or how to make it better ?

Thanks
ZMM
ziemowitzima is offline   Reply With Quote

Reply

Tags
direction dependent diff, non-constant diffusion, nonlinear diffusion, nonlinear equation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:14.