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

The most efficient way to compute n:th derivative?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2015, 15:41
Default The most efficient way to compute n:th derivative?
  #1
Member
 
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13
heksel8i is on a distinguished road
For the beginning I am interested in to compute efficiently a second derivative of a variable with respect to spatial coordinates x y and z. In other words the diagonal terms of grad(grad(f)).

I would like to benefit as much as possible from the existing functions as grad, div and existing boundary condition calls, but still obtain an efficient way to manage this. For example when approaching this by two gradient calls, we compute extra cross terms, which are not used.

Would the following be faster : f_xx = div([grad(f).component.X 0 0]) ? where the brackets describe a vector.

Or maybe by simply creating a new matrix operation to do this. Would I enter up having problems when applying boundary conditions?


Another thing is that the implementation should be able to take the mesh non-orthogonality / skewness corrections into account. E.g. something like f_xx = grad(snGrad(f)) . component(X)

Thirdly it would be beneficial to have this easily extended to higher order derivatives either by applying the operation several times in a row or by creating simply a new operator.


I am open to any ideas and suggestions!
heksel8i is offline   Reply With Quote

Reply


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
Which is the most efficient way to compute force coefficients? araujo Main CFD Forum 0 December 12, 2014 00:17
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
Is there any efficient algorithm to compute the determinant of a sparse matrix? HectorRedal Main CFD Forum 8 July 21, 2012 03:44
How do I compute the normal vector to a surface with FEM Vasilis Main CFD Forum 3 July 31, 2009 07:59
How to compute the second derivative of pressure skabilan OpenFOAM Running, Solving & CFD 1 December 22, 2008 15:53


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