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

Alternative formulation of momentum equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2013, 14:05
Default Alternative formulation of momentum equation
  #1
New Member
 
Thomas K.
Join Date: Jan 2011
Posts: 15
Rep Power: 15
TomKopp is on a distinguished road
Is it possible to use

Code:
fvm::div(phi, U)
- fvc::div(tau)
instead of

Code:
fvm::div(phi, U)
- fvm::laplacian(fluid.nu(), U)
- (fvc::grad(U) & fvc::grad(fluid.nu()))
which is the standard formulation in non-Newtonian, steady-state solvers?

I would like to modify the stress tensor before the momentum equation is solved (i.e. include the elongational viscosity in normal direction).

For the energy equation this is already working:

Code:
// calculate stress tensor
    
volTensorField gradU = fvc::grad(U);
volTensorField tau = fluid.nu() * (gradU + gradU.T());
tau.component(tensor::XX) = tau.component(tensor::XX) / max(dimensionedScalar ("VSMALL", dimensionSet(0,2,-1,0,0,0,0), VSMALL), fluid.nu()) * elongFluid.nuElong();
tau.component(tensor::YY) = tau.component(tensor::YY) / max(dimensionedScalar ("VSMALL", dimensionSet(0,2,-1,0,0,0,0), VSMALL), fluid.nu()) * elongFluid.nuElong();
tau.component(tensor::ZZ) = tau.component(tensor::ZZ) / max(dimensionedScalar ("VSMALL", dimensionSet(0,2,-1,0,0,0,0), VSMALL), fluid.nu()) * elongFluid.nuElong();

// energy equation

tmp<fvScalarMatrix> TEqn
(
    fvm::div(phi, T)
  - fvm::laplacian(alpha, T)
  - 1.0/Cp * (tau && gradU)
);
      
TEqn().relax();

solve(TEqn());
However, when I use Gauss linear scheme for div((nu*(grad(U)+grad(U).T()))) the time step continuity error gets very high after only one step.

Does anyone have an idea how to solve the problem? Thank you in advance!
TomKopp is offline   Reply With Quote

Old   July 1, 2013, 13:07
Default Stress tensor
  #2
New Member
 
Thomas K.
Join Date: Jan 2011
Posts: 15
Rep Power: 15
TomKopp is on a distinguished road
Even if I use

Code:
volTensorField gradU = fvc::grad(U);
volTensorField tau = fluid.nu() * (gradU + gradU.T());
without the elongational viscosity and then for the momentum equation

Code:
fvm::div(phi, U)
- fvc::div(tau)
it is not working (time step continuity error very high).

How can I tell OpenFOAM to solve

Code:
fvc::div(tau)
correctly?
TomKopp is offline   Reply With Quote

Old   July 1, 2013, 14:04
Default Explicit (fvc) and implicit derivative (fvm)
  #3
New Member
 
Thomas K.
Join Date: Jan 2011
Posts: 15
Rep Power: 15
TomKopp is on a distinguished road
Can it be due to the use of an explicit (fvc) instead of an implicit derivative (fvm)? Do I have to use an transient solver or should it also work for a steady-state solver like simpleFoam?
TomKopp 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Question on the discretization of momentum equation in icoFoam MPJ OpenFOAM 3 October 4, 2011 10:44
Discretization of momentum equation query siw CFX 0 June 20, 2011 09:38
Question on momentum equation in VOF or Level Set Kai Yan Main CFD Forum 0 January 11, 2008 09:47
Compressible vs. Incompressible formulations Fernando Velasco Hurtado Main CFD Forum 3 January 7, 2000 17:51


All times are GMT -4. The time now is 17:59.