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

Add source term in alphaEqn.H of interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2012, 11:41
Default Add source term in alphaEqn.H of interFoam
  #1
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 14
tayo is on a distinguished road
Hello all,

Just a quick one. I added a source term (Sp) to alphaEqn.H in interFoam. I tried following example in interPhaseChangeFoam but compiling it gives me error in MULES that "5 arguments are expected, 6 provided" (Sp is the addition). How do I properly include this Sp source term in the alpha eqn? Or is there an alternative way to do this? Thanks


surfaceScalarField phiAlpha
(
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
)
);

volScalarField Sp
(
IOobject
(
"Sp",
runTime.timeName(),
mesh
),
source term
);

MULES::explicitSolve(alpha1, phi, phiAlpha, Sp, 1, 0);
tayo is offline   Reply With Quote

Old   October 23, 2013, 04:40
Default
  #2
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14
Mahdi2010 is on a distinguished road
If you wanna add any source term to the alpha equation using the MULE
solver, you need to take care of the MULE functions in MULE.H.
There are two ways that MULE works, implicit or explicit. whether your source term is defined explicitly or implicitly, you should have Su and Sp as the source term.
in your code you call the MULE explicitly but you define 1 source term. the error says that
either change the function call to implicit solve or define a new source term called Su.
By the way, what your source term looks like?
Mahdi2010 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
Solve poisson equation just add a source term nandiganavishal OpenFOAM Running, Solving & CFD 18 November 14, 2022 10:12
InterFoam: add a source term in alpha eq. Alucard OpenFOAM Programming & Development 12 November 5, 2017 20:16
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
Add time dependent Source term libe OpenFOAM Running, Solving & CFD 13 September 23, 2010 10:12
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 16:55.