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

Usinng divDevReff vs div(R) + laplacian(nu,U)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2010, 17:20
Default Usinng divDevReff vs div(R) + laplacian(nu,U)
  #1
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 18
mchurchf is on a distinguished road
I am wondering if anyone can help with a problem I am encountering. I need to apply boundary conditions on SGS stresses in addition to nuSgs. I would like to perform near-wall modeling in LES by setting the stess at the wall.

Therefore, I have reformulated the UEqn matrix in a PISO solver to look like:

fvm::ddt(U) + fvm:div(phi,U) + div(R) + laplacian(nu,U)

where R = turbulence->R(); Originally, the code is as follows:

fvm::ddt(U) + fvm:div(phi,U) + turbulence->divDevReff(U)

I am finding that if I set the value of the shear stress at the ground, the solution develops very oscillatory instabilities. If I set the boundary condition of R to zeroGradient, things are okay, but I need to be able to set specific stress tensor values at the ground.

Any ideas??

Thanks,

Matt
mchurchf is offline   Reply With Quote

Old   April 5, 2010, 15:27
Default
  #2
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 18
mchurchf is on a distinguished road
I just want to ask the above question again. If anyone can help, it would be much appreciated.

Matt
mchurchf is offline   Reply With Quote

Old   April 8, 2010, 07:34
Default
  #3
chb
New Member
 
CHB
Join Date: Oct 2009
Posts: 3
Rep Power: 16
chb is on a distinguished road
Could it be that the signs of your div() and laplacian() term are wrong?

Maybe

fvm::ddt(U) + fvm:div(phi,U) - fvc::div(R) - fvm::laplacian(nu,U)

solves your problem.

chb is offline   Reply With Quote

Old   April 8, 2010, 09:26
Default Using divDevReff vs div(R) - laplacian(nu,U)
  #4
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 18
mchurchf is on a distinguished road

Christof,

Thanks for your reply. You are correct about my signs being partially incorrect. I typed them into my original posting at the top of the thread incorrectly, but I had them coded correctly. They should be

fvm::ddt(U) + fvm:div(phi,U) + fvc::div(R) - fvm::laplacian(nu,U)

where R = turbulence->R(). One interesting thing that I am finding is that in the code for a full Reynolds or SGS stress model like the LRR model, divDevReff(U) is defined as:

+ fvc::div(R_ + couplingFactor_*nut_*fvc::grad(U), "div(R)")
+ fvc::laplacian((1.0 - couplingFactor_)*nut_,U,"laplacian(nuEff,U)")
- fvm::laplacian(nuEff(), U)

which is interesting. Why not just define it as
+ fvc::div(R) - fvm::laplacian(nu, U) like I have unsuccessfully tried to do? The above formulation contains both a "coupling factor", which could possibly by used for stability reasons, and it contains an implicit Laplacian that uses nuEff (which is larger than just nu), which seems to be important for stability in OpenFOAM solvers. divDevReff(U) in the eddy-viscosity based solvers also is formulated to include an implicit Laplacian that uses nuEff, although there would be other ways to formulate this term without a Laplacian using nuEff such as

- fvc::div(nut_*twoSymm(fvc::grad(U))) - fvm::laplacian(nu,U)


Since at least the OpenFOAM PISO-based solvers do not include added dissipation terms, I am wondering if this fvm::laplacian(nuEff,U) is in there for stability reasons.

Matt


mchurchf is offline   Reply With Quote

Old   April 9, 2010, 04:37
Default
  #5
chb
New Member
 
CHB
Join Date: Oct 2009
Posts: 3
Rep Power: 16
chb is on a distinguished road
Since fvc::div(R) is an explicit term, it might cause numerical instabilities when your time step is too large. Maybe reducing the time step to get a cell CFL number less than 1 helps. CFL = U_ref * DT / DX where DX is the cell size and DT the time step. I'd try DT = 0.25 * DX / U_ref to get the explicit formulation stable. (Depending on the diffusion number it could be that you even need an much smaller time step with an explicit formulation.)

Last edited by chb; April 9, 2010 at 04:55.
chb is offline   Reply With Quote

Old   April 8, 2015, 08:29
Default
  #6
New Member
 
Panagiotis Giannatselis
Join Date: Jan 2015
Location: Athens, Greece
Posts: 5
Rep Power: 11
pgiannatselis is on a distinguished road
hi everyone

I am trying to use the following UEqn


tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::laplacian(nueff, U)
- g
- fvm::div(nueff, fvc::grad(U)) - fvm::div(nueff, T(fvc::grad(U))) //this line
==
fvOptions(U)
);


nueff is volScalarField


errors that no matching function for call to ‘div(Foam::volSca.......... appear and I can't find out where I am wrong.

Can anyone point out how I should syntax the two terms. Without these terms no errors appear. Thanks a lot in advance.
pgiannatselis 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



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