CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Create a biharmonic operator (http://www.cfd-online.com/Forums/openfoam-programming-development/84170-create-biharmonic-operator.html)

Pascal_doran January 21, 2011 17:58

Create a biharmonic operator
 
Hi all,

I would like to use a biharmonic operator for implicit calculation. I tried to use the laplacian of the laplacian but it didn't work. So should I implement a new operator? If yes, does anyone could help me to get started. I took a look at the laplacian scheme :
/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme

and I'm a little confused with the oriented object programming. Any help would be greatly appreciated.

Pascal

ziemowitzima August 1, 2011 17:55

Hi Pascal,
I am facing the same problem right now.
Did you were able to implement biharmonic operator ?
Or maybe you know some other solution for this problem ?

Thanks
ZM

Pascal_doran August 1, 2011 21:45

Hi,

No solution have been found yet, but if you find one let me know.
Pascal

ziemowitzima August 2, 2011 16:35

Hi Pascal,
The only solution I can think about is just explicit discretization.
If you want to calculate
laplacian(laplacian(f(x,y))) = fxxxx + 2fxxyy + fyyyy
then you can make it like that:
fvc::laplacian(fvc::laplacian(f))

-ZM

Pascal_doran August 2, 2011 17:23

Hi Ziemowit,

I tried this one but the stability condition on such explicit discretization seems very restrictive. I think it has for consequence that you need to reduce dt a lot.

No?

Pascal

ziemowitzima August 2, 2011 17:48

yes,
it is very possible...

eysteinn October 19, 2011 06:28

Hi all,

Have you managed to get working the laplacian(laplacian)?

Using the explicit formulation my simple case blows up very quickly.

/Eysteinn

ziemowitzima October 24, 2011 10:29

Hi Eysteinn,
I think that the best solution is just to solve two equations instead on one:
laplacian(laplacian(f)) = g
can be solves as:
1) laplacian(h) = g
2) laplacian(f) = h

ZM

eysteinn October 31, 2011 08:50

Quote:

Originally Posted by ziemowitzima (Post 329197)
Hi Eysteinn,
I think that the best solution is just to solve two equations instead on one:
laplacian(laplacian(f)) = g
can be solves as:
1) laplacian(h) = g
2) laplacian(f) = h

ZM


Thank you for the answer and sorry for my late answer.
This does not seem to solve my problem. Yes it runs but diverges
for the simplest cases.
btw. my equation also includes time derivative + extra terms:

http://upload.wikimedia.org/wikipedi...15a0eb8707.png

/Eysteinn

ziemowitzima October 31, 2011 11:29

Hi ,
As far as I know OF has only linear solvers for algebraic equations. So it means that it is impossible to discretized non-linear terms in the implicit way (using fvm:: ).
In my opinion (but I am not an OF expert) it seems that in your equation:
\frac{\partial c}{\partial t} = D\nabla^2 c^3 - D\nabla^2 c - D\gamma\nabla^4 c

you have to treat first and third term explicitly and only second can be treated implicitly. Of course third term is not-linear but as far as I know there is no biharmonic operator in OF.
In general I was dealing with biharmonic operator as well, and I solved it the way I posted before. But I was solving it in Matlab using FFT not in OF.
The only idea I have now is :
fvm::\nabla^2 h = c
fvm::\frac{\partial c}{\partial t} = fvc::D\nabla^2 c^3 - fvm::D\nabla^2 c - fvc::D\gamma\nabla^2 h

and because diffusion-like terms are treated explicitly then you have to pay attention to the time step, it has to be small enough to fulfill the condition:
\frac{D\Delta t}{\Delta x^2} < C, \: \frac{\gamma D\Delta t}{\Delta x^2} < C

I think that it should work. I would recommend for the beginning to solve:
fvm::\nabla^2 h = c
fvm::\frac{\partial c}{\partial t} = - fvc::D\nabla^2 h

ziemowitzima October 31, 2011 11:31

sorry, it should be:
...
Of course third term is not nolinear but as far as I know there ...
...


All times are GMT -4. The time now is 16:04.