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

Linearized momentum source terms

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2017, 05:53
Post Linearized momentum source terms
  #1
New Member
 
Anders Simonsen
Join Date: Sep 2013
Posts: 18
Rep Power: 12
ASimonsen is on a distinguished road
Hi

I'm facing a problem with implementing a linearized source term for the momentum equations.

The U-equation in my solver states (Turbulence+Steady state):
Code:
tmp<fvVectorMatrix> tUEqn
(
    fvm::div(phi, U)
  + turbulence->divDevRhoReff(U)
); // [N/m^3]
I'd like to implement a linearized source term in the following form:
Code:
p[0] = p_Su[0] + p_Sp[0] * (U[0] - U_Ref[0])
p[1] = p_Su[1] + p_Sp[1] * (U[1] - U_Ref[1])
p[2] = p_Su[2] + p_Sp[2] * (U[2] - U_Ref[2])
I've tried:
Code:
tmp<fvVectorMatrix> tUEqn
(
    fvm::div(phi, U)
  + turbulence->divDevRhoReff(U)
  ==
  p_Su
  - fvc::Sp(p_Sp,U)
  - fvm::SuSp(-p_Sp,U)
); // [N/m^3]
p_Su [N/m^3] and p_Sp [N/m^3-(m/s)] are of type volVectorField with sizes [nCells , 3], but the above implementation invoked an error, when I tried to compile it.

The format shown above works for scalar equations, where I've successfully implemented it for scalar species as shown below:

Code:
fvScalarMatrix YiEqn
(
  mvConvection->fvmDiv(phi, Yi)
  - fvm::laplacian(turbulence->muEff(), Yi)
  ==
  Yi_Su
  - fvc::Sp(Yi_Sp,Yi)
  - fvm::SuSp(-Yi_Sp,Yi)
); // [kg/s-m^3]
Yi_Su [kg/s-m^3] and Yi_Sp [kg/s-m^3-(kg/kg)] are of type volScalarField with sizes [nCells , 1].

Can someone help me with my problem?
I'd like to avoid using fvOptions, as I can't specify the source terms for each cell individually.

Best regards Anders
ASimonsen is offline   Reply With Quote

Reply

Tags
momentum equation, source term

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 16:14
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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