CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Boundary condition for non newtonian flow (need to solve a differential equation) (https://www.cfd-online.com/Forums/openfoam/92419-boundary-condition-non-newtonian-flow-need-solve-differential-equation.html)

 liguifan September 14, 2011 00:17

Boundary condition for non newtonian flow (need to solve a differential equation)

Hi,

I am now to use non-newtonian boundary inlet condition for my pipe. But as I notice that:

As the velocity profile is not pure parabolic shape. I need to solve the following equation

p+(1/r)*(d/dr)*[r(A+(A-B)/(1+K*(dV/dr))*dV/dr]=0

Can anyone tell me how to put this equation as boundary condition. Really stuck with it.

Please give me some hind on details.

 wWieWalter September 14, 2011 01:46

Hi,

I never used such a BC, but I would solve your equation externaly (with Matlab) on a face equally like your's and the try to map these solution witch mapFields. I guess that it also should be possible to map the solution directly by a list of points.

Good luck.
wWW

 liguifan September 14, 2011 02:51

Quote:
 Originally Posted by wWieWalter (Post 324035) Hi, I never used such a BC, but I would solve your equation externaly (with Matlab) on a face equally like your's and the try to map these solution witch mapFields. I guess that it also should be possible to map the solution directly by a list of points. Good luck. wWW

It worth a try by using directMapped. For this static case, if I can successfully export data in same format directMapped accept, that will do.

But what I actually want to do it to implement more complex function that velocity change will time and location. I am not sure directMapped can not manipulate that kind of thing. So I still need to solve an equation that U is a variable inside.

Do you have any idea to build a new boundary condition that can solve equations?

Cheers!

 eysteinn September 14, 2011 07:24

For a boundary condition changing with time and space you should be able to use groovyBC
See:
http://openfoamwiki.net/index.php/Contrib_groovyBC

/Eysteinn

 liguifan September 14, 2011 10:37

Quote:
 Originally Posted by eysteinn (Post 324085) For a boundary condition changing with time and space you should be able to use groovyBC See: http://openfoamwiki.net/index.php/Contrib_groovyBC /Eysteinn
Hi Eysteinn,

groovyBC is a very powerful tool. But it lack a function I need to implement my velocity.

My velocity is dependent on time and locatation.

It is like something u(r,t)= real(i*exp(i*w)* Bessel(i*t))

where i is complex number and w is constant. Bessel is the Bessel function that can resolve complex number( This is not conclude in the OpenFOAM). I think the only way to do is to import a math libarary that can resolve Bessel(i*t).

That why I want to implement a new boundary in fvPatchfield.

Cheers!

 gschaider September 15, 2011 07:48

Quote:
 Originally Posted by liguifan (Post 324116) Hi Eysteinn, Thank for replying. groovyBC is a very powerful tool. But it lack a function I need to implement my velocity. My velocity is dependent on time and locatation. It is like something u(r,t)= real(i*exp(i*w)* Bessel(i*t)) where i is complex number and w is constant. Bessel is the Bessel function that can resolve complex number( This is not conclude in the OpenFOAM). I think the only way to do is to import a math libarary that can resolve Bessel(i*t). That why I want to implement a new boundary in fvPatchfield. Cheers!
WolframAlpha informs me that your expression is

Imag(e^(i w) (i t)^n t^-n I_n(t))

with I_n being the modified Bessel function. That shouldn't be to hard to get to a pure "real" form (especially if n=0)

 All times are GMT -4. The time now is 17:08.