CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Implementing third order derivatives in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 28, 2009, 07:15
Default Implementing third order derivatives in OpenFOAM
  #1
New Member
 
Alfons Smale
Join Date: Jun 2009
Location: Delft, Netherlands
Posts: 2
Rep Power: 0
asmale is on a distinguished road
Hi All,

After successful use of standard solvers of OpenFOAM as well as making small changes to existing solvers, I am now in process of developing a new solver based on the shallowWaterFoam solver from version 1.6 (as a personal research topic). The objective is to include (standard) dispersive Boussinesq Wave (BW) terms before extending the model us such that it can be used to test a newly derived boussinesq approach.

As a starter, I need to add the following two dispersive terms (as presented in Madsen and Sorensen, 1992) to the LHS of the hUEqn as presented in ShallowWaterFoam, leading to the following fvVectorMatrix hUEqn:

fvVectorMatrix hUEqn
(
fvm::ddt(hU)
+ fvm::div(phiv, hU)
-A*fvc::div(fvc::grad(fvc::ddt(hU)))
-B*fvc::grad(fvc::laplacian(h))
);

For sake of stability I did not implement the above, but the below hUEqn, allowing for a time lag for the BW-terms (as is done with turbulence).

fvVectorMatrix hUEqn
(
fvm::ddt(hU)
+ fvm::div(phiv, hU)
+BW_term
);

In which the BW_term is defined after completion of the PISO loop, but within the time loop:
tt == fvc::laplacian(hU);
BW_1 == -A*( fvc::ddt(tt) );
BW_2 == -B*fvc::grad(fvc::laplacian(h));
BW_term == BW_1+BW_2;

This approach does not work due to the fact that I take (i) a third derivative of the variable 'h' {d(h)/dxxx} as well as a second spatial and first time derivative of hU {d(hU)/dxxt}. Variation of interpolation schemes did not help me: I still get a fast growing grassy terms. This is especially the case near the boundaries. Investigations show that taking the laplacian(h) leads to a visually smooth solution but numerically discontinuous solution. This holds also for taking the laplacian from (hU). Taking respectively the grad and ddt of these terms obviously introduces the grassy results.

So I would like to ask the following:
(i) Has anyone encountered this before and how did you solve this problem (I suspect that people dealing with acoustics have the same problem)?
(ii) Is there a way to introduce some kind of smoother on the laplacian results before taking the grad or ddt?
(iii) Would derivation of a dxxx class, following the approach specified in phd-research of Jasak (section 3.3.1) be a solution?
(iv) Am I overlooking something else (probably something obvious, since it is the first time I dive into OpenFOAM like this..)?

Thanks in advance!
Alfons
asmale is offline   Reply With Quote

Old   August 7, 2013, 08:43
Default
  #2
Member
 
Hrushi
Join Date: Jan 2013
Posts: 51
Rep Power: 3
hrushi.397 is on a distinguished road
Hi Alfons,

Did you get solution to your problem? Did you manage to find out how to get third derivative in openfoam?
hrushi.397 is offline   Reply With Quote

Old   November 7, 2013, 17:21
Default hello
  #3
New Member
 
Baek, Dong Hae
Join Date: Jan 2013
Location: Seoul
Posts: 23
Rep Power: 3
wes1204 is on a distinguished road
hello

I also faced to same problem
did you solve it???
my case is related to turbulent diffusion having different coefficient in each direction.

please help me
wes1204 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - 2nd order of discretization? makaveli_lcf OpenFOAM Running, Solving & CFD 0 November 12, 2009 08:15
How to calculate second order derivatives using udf? legendyxg Fluent UDF and Scheme Programming 0 October 6, 2009 23:05
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
Second order spatial derivatives KRK Main CFD Forum 0 June 26, 2007 00:18


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