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

How to add fvOptions into twoLiquidMixingFoam apps?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2020, 09:18
Question How to add fvOptions into twoLiquidMixingFoam apps?
  #1
New Member
 
Lingfu Zhu
Join Date: Aug 2020
Posts: 1
Rep Power: 0
Merlinizlf is on a distinguished road
Hello everyone,
I am a new foamer. Iam using the OpenFOAM6.
Recently, I try to add fvOptions(alpha1) into the alphaDiffusionEqn in the twoLiquidMixingFoam, the following error was showed when I wmake:

alphaDiffusionEqn.H: In function ‘int main(int, char**)’:
alphaDiffusionEqn.H:11:10: error: ‘fvOptions’ was not declared in this scope
== fvOptions(alpha1)//add
^~~~~~~~~
alphaDiffusionEqn.H:11:10: note: suggested alternative: ‘fvOption_H’
== fvOptions(alpha1)//add
^~~~~~~~~
fvOption_H

However, I added the fvOptions.H in the file my_twoLiquidMixingFoam.C at the beginning. As following:

#include "pimpleControl.H"
#include "fvOptions.H"//add this



The file alphaDiffusionEqn.H I changed is showed as follows:


fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1)
- fvc::ddt(alpha1)
- fvm::laplacian
(
volScalarField("Dab", Dab + alphatab*turbulence->nut()),
alpha1
)
== fvOptions(alpha1)//add
);

fvOptions.constrain(alpha1Eqn);//add this
alpha1Eqn.solve();
fvOptions.correct(alpha1);

alpha2 = 1.0 - alpha1;
rhoPhi += alpha1Eqn.flux()*(rho1 - rho2);
}

rho = alpha1*rho1 + alpha2*rho2;

Any suggestions and commons are very welcome

Thank you
Best Regards
Merlinizlf is offline   Reply With Quote

Reply

Tags
twoliquidmixingfoam


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
Adding temperature dependent heat source using fvOptions in chtMultiRegionSimpleFoam shaileshbg OpenFOAM Running, Solving & CFD 14 January 26, 2024 18:48
How to add a new material in the fluent Database MikeITA FLUENT 5 December 13, 2021 22:40
How to add source terms using fvOptions noobFoam OpenFOAM Running, Solving & CFD 1 June 29, 2018 08:29
Building a solver with fixedTemperatureConstraint using fvOptions Fluido OpenFOAM Programming & Development 9 February 15, 2018 00:30
Add Measure Markings or Coordinates to the Contour Colin FLUENT 4 August 25, 2004 09:54


All times are GMT -4. The time now is 13:27.