CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Create a biharmonic operator

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2011, 17:58
Default Create a biharmonic operator
  #1
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17
Pascal_doran is on a distinguished road
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
Pascal_doran is offline   Reply With Quote

Old   August 1, 2011, 18:55
Default
  #2
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
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
ziemowitzima is offline   Reply With Quote

Old   August 1, 2011, 22:45
Default
  #3
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17
Pascal_doran is on a distinguished road
Hi,

No solution have been found yet, but if you find one let me know.
Pascal
Pascal_doran is offline   Reply With Quote

Old   August 2, 2011, 17:35
Default
  #4
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
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
ziemowitzima is offline   Reply With Quote

Old   August 2, 2011, 18:23
Default
  #5
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17
Pascal_doran is on a distinguished road
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
Pascal_doran is offline   Reply With Quote

Old   August 2, 2011, 18:48
Default
  #6
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
yes,
it is very possible...
ziemowitzima is offline   Reply With Quote

Old   October 19, 2011, 07:28
Default
  #7
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17
eysteinn is on a distinguished road
Hi all,

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

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

/Eysteinn
eysteinn is offline   Reply With Quote

Old   October 24, 2011, 11:29
Default
  #8
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
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
ziemowitzima is offline   Reply With Quote

Old   October 31, 2011, 08:50
Default
  #9
Member
 
Eysteinn Helgason
Join Date: Sep 2009
Location: Gothenburg, Sweden
Posts: 53
Rep Power: 17
eysteinn is on a distinguished road
Quote:
Originally Posted by ziemowitzima View Post
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:



/Eysteinn
eysteinn is offline   Reply With Quote

Old   October 31, 2011, 11:29
Default
  #10
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
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 is offline   Reply With Quote

Old   October 31, 2011, 11:31
Default
  #11
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
sorry, it should be:
...
Of course third term is not nolinear but as far as I know there ...
...
ziemowitzima is offline   Reply With Quote

Old   May 20, 2016, 20:43
Default
  #12
New Member
 
Kareem Abdelshafy
Join Date: Feb 2016
Location: Boston MA USA
Posts: 4
Rep Power: 10
Kareem Abdelshafy is on a distinguished road
I think Mieszko algorithm for solving the fourth order equation is not right.

fvm::laplacian (h) =c
fvm::ddt(c) = -fvc::laplacian (D, h)

This is equal to

fvm::ddt(c) = D*c
Kareem Abdelshafy is offline   Reply With Quote

Old   May 22, 2016, 07:02
Default
  #13
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
yes,
you are right,
it should be:
h = fvc::laplacian (c)
fvm::ddt(c) = -fvm::laplacian (D, h)

This is equal to

fvm::ddt(c) = -fvm::laplacian (D, fvc::laplacian (c))
ziemowitzima is offline   Reply With Quote

Reply

Tags
biharmonic, hyper viscosity, operator, scheme


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
create the file *.foam phongstar OpenFOAM 12 October 14, 2018 19:06
Meshing a Sphere Ajay FLUENT 10 September 3, 2016 15:18
Actuator disk model audrich FLUENT 0 September 21, 2009 08:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 02:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 15:27.