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

different solver behaviour with divDevReff()

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2020, 08:44
Default different solver behaviour with divDevReff()
  #1
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 204
Rep Power: 16
t.teschner is on a distinguished road
I am implementing the Artificial Compressibility (AC) and Fractional-Step Pressure Projection (FS-PP) method into OpenFOAM. For laminar flows, they work well and I can validate them against benchmark cases. Next, I wanted to add turbulence and added the turbulence->divDevReff() object, which in turn is adding the viscous and Reynolds stresses. So I removed the laplacian operator from my momentum equation but then get different results.

For the AC method, it seems my results are correct when I add the laplacian to the momentum equation, but for the FS-PP method, it seems to work only if I remove the same operator. If I reverse this, i.e. remove the laplacian from the AC method and add it to the FS-PP method, I am getting incorrect results.

I am testing the couette flow as a test case and I am adding the dual time stepping to the AC method to get a correct time behaviour. This is, for the moment, a laminar test case and turbulence is switched off.

Solving the AC method with the following momentum equation:

Code:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
- fvm::Sp(dualTime.SpCoefficient(), U)
+ fvc::Sp(dualTime.SuCoefficient(), dualTime.Su())
);
results in (solid lines represent the analytic solution in 2D for laminar flows (here Re=100) and the dots correspond to the numerical solution. Same coloured dots / lines correspond to the solution obtained at the same time):



If I change the momentum equation to include the viscous term, i.e. solving

Code:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(turbulence->nuEff(), U)
+ turbulence->divDevReff(U)
==
- fvm::Sp(dualTime.SpCoefficient(), U)
+ fvc::Sp(dualTime.SuCoefficient(), dualTime.Su())
);
I get



So it seems that the correct solution is obtained including the laplacian (which is odd as the turbulence->difDevReff() is including the same term.

For the FS-PP method, it is the opposite behaviour, i.e. if I solve the momentum equation without laplacian, i.e.

Code:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
I get



and if I include the laplacian, i.e. solving

Code:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(turbulence->nuEff(), U)
+ turbulence->divDevReff(U)
);
I get



which demonstrates that the correct behaviour is seemingly obtained with the laplacian for the AC method but without for the FS-PP method.

It seems that the FS-PP implementation is correct as the laplacian term is included only once and that there is something wrong with the AC method. The source term in the AC method is simply the contribution of the real time derivative, i.e. in the simplest case the backward Euler scheme as (U^n+1 - U^n) / dt. Here, both Sp and Su coefficients are 1/dt and Su itself is U^n. Substituting that back into the momentum equation will reconstruct the time derivative as given above.

Any ideas what could cause this problem?

Last edited by t.teschner; September 5, 2020 at 13:57.
t.teschner 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
Radiation Modeling Using Discrete Ordinates Method and Parallel Solver malicemethods FLUENT 3 May 25, 2018 14:25
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 19:41.