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

differentiation in one direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2011, 19:39
Default [solved]differentiation in one direction
  #1
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Dear Foamers,

Does anyone of you know what is the best way to dicsretize following problem:
we have: f(x,y) -- scalar function

we need: f_xxxx
(fourth order) differentiation but only in one direction.

i.e.
laplacian(f) = f_xx + f_yy
but I need only f_xx (in fact I need f_xxxx)

Thanks
ZM

Last edited by ziemowitzima; August 4, 2011 at 15:16. Reason: solved
ziemowitzima is offline   Reply With Quote

Old   August 2, 2011, 02:55
Default
  #2
New Member
 
Fabian
Join Date: Jan 2010
Posts: 27
Rep Power: 16
gautcho is on a distinguished road
You should use a difference quoutient, like you have propably seen for f_x. You can perform the difference quotient "four" times or you can have a look here (they have already done it for you):

http://en.wikipedia.org/wiki/Difference_quotient

Probably it should be the best for you to read the whole article, but you can also jump ahead to:

http://en.wikipedia.org/wiki/Differe....C5.83th_Order
gautcho is offline   Reply With Quote

Old   August 2, 2011, 12:10
Default
  #3
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Thanks
This I know.
I didn't put it explicit in my question but I need to know how to make it in OpenFOAM.

-Best
ziemowitzima is offline   Reply With Quote

Old   August 2, 2011, 18:52
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
so far I found such explicit solution:

volVectorField gradT=fvc::grad(T); // (T_x, T_y)
volScalarField Txxxx = gradT.component(0); // T_x
gradT = fvc::grad(Txxxx); // (T_xx, T_xy)
Txxxx = gradT.component(0); // T_xx
gradT = fvc::grad(Txxxx); // (T_xxx, T_xxy)
Txxxx = gradT.component(0); // T_xxx
gradT = fvc::grad(Txxxx); // (T_xxxx, T_xxxy)
Txxxx = gradT.component(0); // T_xxxx

Maybe someone have some better idea ?
Is it possible to descritize T_xxxx implicitly ?

-ZM
ziemowitzima is offline   Reply With Quote

Old   August 4, 2011, 13:24
Default
  #5
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
It seems that problem can be solved (after Akidess suggestion ):

"... it sounds like you want anisotropic diffusion - why not just pass a diffusion coefficient tensor to laplacian instead of a scalar?..."
from:
http://www.cfd-online.com/Forums/ope...-operator.html

So,
x - direction diffusion:
DTe1D DTe1D [ 0 2 -1 0 0 0 0 ] (3e-02 0 0 0 0 0 0 0 0 );

x,y and - directions diffusion:
DTe3D DTe3D [ 0 2 -1 0 0 0 0 ] (3e-02 0 0 0 3e-02 0 0 0 3e-02 );

for f_xxxx it can be done as follows :
suppose we have equation f_xxxx = g(x,y),
substitution: h = f_xx
so we have two "one-directional" Poison equations to solve:
h_xx = g(x,y)
f_xx = h(x,y)

in OF:
fvm::laplacian(DTe1D, h) == g
fvm::laplacian(DTe1D, f) == h
ziemowitzima is offline   Reply With Quote

Reply

Tags
one direction diff


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
Flow Direction: normal to boundary!!! Atit CFX 1 August 2, 2015 14:42
Accelerate flow in one direction JanR FLUENT 2 January 19, 2011 16:52
[ICEM] Changing edge direction la7low ANSYS Meshing & Geometry 2 June 7, 2010 14:26
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15
direction of porosity shin FLUENT 0 February 23, 2005 17:17


All times are GMT -4. The time now is 12:01.