Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
September 2013
MFIX2013-2Readmefile
Page2of113
Imagecredits:
Coverpage:AaronMorris,UniversityofColoradoatBoulder:MFIX-DEMsimulationof
solidsfallingthroughanarrayofhexagonaltubes.
Page7,top:AytekinGel,ALPEMIConsulting,LLC:MFIX-TFMsimulationofcoaljet
penetration,coloredbyCO2speciesmassfraction.
Page7,bottom:JordanMusser,DOENETL:ReactiveMFIX-DEMsimulationofa
spoutedbed,particlescoloredbytemperature.
Page8,top:RahulGarg,URSE&CInc.:MFIX-PICsimulationofacyclone,showing
particlesandstreamlines,coloredbyvelocity.
Page8,bottom:JordanMusser,DOENETL:MFIX-Hybridsimulationofabubblingbed
withtwosolidsphases(onecontinuousphaseandonediscretephase).The
backgroundiscoloredbysolidsbulkdensity(continuousphase)andspheresrepresent
thesecondsolidsphase.
MFIX2013-2Readmefile
Page3of113
Notice
Neither the United States Government nor any agency thereof, nor any of
theiremployees,makesanywarranty,expressorimplied,orassumesany
legalliabilityorresponsibilityfortheaccuracy,completeness,orusefulness
of any information, apparatus, product, or process disclosed or represents
thatitsusewouldnotinfringeprivatelyownedrights.
MFIXisprovidedwithoutanyusersupportforapplicationsinthe
user'simmediateorganization.Itshouldnotberedistributedinwhole
orinpart.
TheuseofMFIXistobeacknowledgedinanypublishedpaperbased
oncomputationsusingthissoftwarebycitingtheMFIXtheory
manual.Someofthesubmodelsarebeingdevelopedbyresearchers
outsideofNETL.Theuseofsuchsubmodelsistobeacknowledged
bycitingtheappropriatepapersofthedevelopersofthesubmodels.
Theauthorswouldappreciatereceivinganyreportsofbugsorother
difficultieswiththesoftware,enhancementstothesoftware,and
accountsofpracticalapplicationsofthissoftware.
Disclaimer
Thisreportwaspreparedasanaccountofworksponsoredbyan
agencyoftheUnitedStatesGovernment.NeithertheUnitedStates
Governmentnoranyagencythereof,noranyoftheiremployees,makes
anywarranty,expressorimplied,orassumesanylegalliabilityor
responsibilityfortheaccuracy,completeness,orusefulnessofany
information,apparatus,product,orprocessdisclosed,orrepresentsthat
itsusewouldnotinfringeprivatelyownedrights.Referencehereintoany
specificcommercialproduct,process,orservicebytradename,
trademark,manufacturer,orotherwisedoesnotnecessarilyconstituteor
implyitsendorsement,recommendation,orfavoringbytheUnited
StatesGovernmentoranyagencythereof.Theviewsandopinionsof
authorsexpressedhereindonotnecessarilystateorreflectthoseofthe
UnitedStatesGovernmentoranyagencythereof.
MFIX2013-2Readmefile
Page4of113
TableofContents
1. Introduction...........................................................................................................6
2. DevelopmentstateofMFIXmodels........................................................................7
3. 2013-2Releasenotes............................................................................................9
4. SettingUpandRunningMFIXonaUNIX/LINUXWorkstation...............................10
4.1. CreatingMFIXDirectory.......................................................................................10
4.2. Aliascreation.......................................................................................................11
4.3. Creationofexecutablefiles..................................................................................12
4.3.1. MFIXMakefiles.............................................................................................13
4.3.2. CompilingMFIXforthefirsttime:Astep-by-stepexample..............................15
4.3.3. CompilingPOSTMFIX...................................................................................17
4.4. VisualizingDatawithParaView............................................................................19
4.5. StartingaNewRun..............................................................................................20
4.6. ModifyingthePost-ProcessingCodes..................................................................24
5. SettingUpandRunningMFIXonWindowsWorkstation.......................................24
5.1. InstallingMFIXonWindowsOS...........................................................................24
5.2. InstallingtheMFIXCodeusingCygwinonWindowsOS.......................................24
6. MFIXatRunTime................................................................................................26
6.1. MFIXOutputandMessages.................................................................................26
6.2. RestartingaRun..................................................................................................28
6.3. WhentheRunDoesNotConverge......................................................................28
7. KeywordsinInputDataFile(mfix.dat)..................................................................29
7.1. RunControl.........................................................................................................30
7.2. PhysicalParameters............................................................................................36
7.3. NumericalParameters.........................................................................................39
7.4. GeometryandDiscretization................................................................................44
7.5. GasPhase..........................................................................................................47
7.6. SolidsPhase.......................................................................................................47
7.7. InitialConditions..................................................................................................48
7.8. BoundaryConditions...........................................................................................51
7.9. InternalSurfaces.................................................................................................59
7.10. PointSourceMassInlets...............................................................................61
MFIX2013-2Readmefile
Page5of113
7.11. OutputControl...............................................................................................63
7.12. ChemicalReactionsbasicoptions...............................................................65
7.13. Chemicalreactionsadvancedoptions..........................................................80
7.14. ThermochemicalProperties...........................................................................82
7.15. User-DefinedSubroutines.............................................................................84
7.16. ParallelizationControls..................................................................................87
7.17. MFIXExecutioninBatchQueueEnvironment................................................88
7.18. DiscreteElementModel(DEM)......................................................................90
7.19. MPPICmodel:.............................................................................................103
7.20. DirectQuadratureMethodofMoments(DQMOM)........................................106
7.21. QuadratureMethodofMoments(QMOM)....................................................107
7.22. CohesionModelinDEM..............................................................................107
7.23. Cartesiangrid..............................................................................................111
8. Mailinglists........................................................................................................112
9. Usercontribution...............................................................................................113
MFIX2013-2Readmefile
Page6of113
1. Introduction
MFIXisanopen-sourcemultiphaseflowsolverandisthereforefreetodownloadand
use.Aone-timefreeregistrationisrequiredpriortodownloadingthesourcecode.To
register,gototheMFIXwebsiteathttps://mfix.netl.doe.gov,clickon"Register"atthe
bottomofthehomepageorgodirectlytohttps://mfix.netl.doe.gov/registration.php.
Completetheform,readthenoticeandclickon"IAgree"tosubmityourapplication.
Onceyourapplicationhasbeenreviewedandaccepted,youwillreceiveanemail
notification,andinstructionstodownloadthecode.
Theaboveflowchartprovidesanoverviewoftheworkflowandrelatedsectionsinthis
documentforquickreview.
SomeFrequentlyAskedQuestionslocatedathttps://mfix.netl.doe.gov/faq.phpmaybe
usefultoreviewbeforedownloadingMFIX.
MFIX
Installation
(Sections 4.1 to 4.3)
MFIX
Input setup
(Sections 7)
Run MFIX
(Sections 4.5 & 6)
Post-processing &
Visualization
(Sections 4.3.3 & 4.4)
MFIX2013-2Readmefile
Page7of113
2. DevelopmentstateofMFIXmodels
MFIXprovidesasuiteofmodelsthattreatthecarrierphase(typicallythegasphase
1
)
anddispersephase(typicallythesolidsphase)differently.Theircurrentstateof
developmentissummarizedinthetablesbelow.
Two Fluid Model: MFIX-TFM (Eulerian-Eulerian)
Bothgasandsolidsphasesaretreatedasinterpenetratingcontinuumphases.
Serial
DMP
SMP
Continuity Equations
Momentum Equations
Energy Equations
Species Equations
Chemical Reactions
Cartesian cut-cell
Discrete Element Method: MFIX-DEM (Eulerian-Lagrangian)
Thegasphaseistreatedascontinuumandparticlespositionsaretrackedindividually.
Particlecollisionsaredirectlyresolved.
Serial
DMP
SMP
Momentum Equations
Energy Equations
Species Equations
Chemical Reactions
Cartesian cut-cell
1
Forbubblygas-liquidflows,thecarrierphasewouldbetheliquidphaseandthe
dispersephasewouldbethegasbubbles.
MFIX2013-2Readmefile
Page8of113
Particle in Cell: MFIX-PIC (Eulerian-Lagrangian)
Thegasphaseistreatedascontinuumandparticlesarerepresentedasparcels.
Collisionsarenotdirectlyresolved.SimulationsrunfasterthanDEM,withatrade-off
betweenspeedandaccuracy.
Serial
DMP
SMP
Momentum Equations
Energy Equations
Species Equations
Chemical Reactions
Cartesian cut-cell
Hybrid model: MFIX-Hybrid (Eulerian-Lagrangian-Eulerian)
Thegasphaseistreatedascontinuum.Eachsolidphasecanbetreatedeitheras
continuous(e.g.,thedensephase)ordiscrete(e.g.,thesparsephase).
Serial
DMP
SMP
Momentum Equations
Energy Equations
Species Equations
Chemical Reactions
Cartesian cut-cell
implementedandfullytested
implementedwithlimitedtesting
nottestedorstatusunknown
ModelsnotextendedtoDMP-parallelareonlyavailableforserialruns.
ModelsnotextendedtoSMP-parallelareavailableforSMPrunsbutdonotscalewith
threadcount.
MFIX2013-2Readmefile
Page9of113
3. 2013-2Releasenotes
ForMFIXusersupgradingtothe2013-2Release,pleasenotethefollowingchanges
fromtheprevious(2013-1)release:
Newfeaturesadded:
Stiffchemistrysolver
Thestiffchemistrysolverwascompletelyoverhauledtoeliminateanyuser-
coding.Thiscapabilitycannowbeactivatedwithasinglekeyword(section7.13).
Pointsource
Theabilitytospecifymassinletpointsourceanywhereinthedomainwasadded.
Thiscanbeusefulwhenmodelingasmallsideinlet,withouthavingtoresolvethe
actualgeometry(section7.10).
Subgridmodels
Thetwo-fluidIgciandMiliolifilteredmodelswereimplementedandcanbe
activatedbynewkeywords(page35).
DEMclusterdetection
Analgorithmtodetectclustersandcollectinformationwasimplemented(page
102).
Changesinexistingfeatures:
Parallelexecution
TheSMPdirectiveshavebeenupdatedinkey-subroutines.TheSMPcompilation
options(includinghybridSMP+DMP)havebeenturnedbackon.Pleasenotethat
thereportedCPUtimemaybeinaccurateinSMPmode.
MFIX2013-2Readmefile
Page10of113
4. SettingUpandRunningMFIXonaUNIX/LINUXWorkstation
Pleasereadthisfilecarefullyandifyoustillhaveproblemswithinstallationoruse,send
anemailtomfix-help@mfix.netl.doe.govifyouhaveany.Beforesendingaquestion,
pleasesubscribetomfix-helpmailinglistathttps://mfix.netl.doe.gov/sympa/info/mfix-
help.Oncesubscribed,pleasesearchthearchivesat
https://mfix.netl.doe.gov/sympa/arc/mfix-helpasyourquestionmightbealready
answered.
4.1. CreatingMFIXDirectory
ItisassumedthatyouhaveregisteredanddownloadedMFIX.MFIXisdistributedasa
tarball,calledmfix.tar.gz.Afterdownloadingthetarball,makesureitislocatedinyour
homedirectory.
ToinstallMFIX(version2013-2)fromthetarfile,gotothehomedirectoryandtype
gunzip -d mfix.tar.gz
tar xvf mfix.tar
Extractingthetarballwillcreatethedirectorymfix,whichcontainsthefollowing
subdirectories:
Subdirectory Contents
model MFIXsourcefiles
post_mfix Post_mfixsourcefiles
MFIXisprimarilydesignedtorunonLinuxoperatingsystem.Thesetup
describedinthissectionisthepreferredwayofinstallingandrunning
MFIX.YoushouldbefamiliarwithbasicLinuxoperatingsystem
commandsandproceduresbeforeattemptingtouseMFIX.
MFIX2013-2Readmefile
Page11of113
tutorials Severalexampleproblemsand
correspondingpdffilesdescribingsomeof
thetutorialsexists,whichareusefulfora
newuser
tests Testsimulationsusedtoverifythecode
duringdevelopment
visualization_tools ToolstovisualizeMFIXresults(not
supportedanymore)
tools Developmenttools
doc MFIXmanualsinpdfformat
4.2. Aliascreation
Forconvenience,createaliasesbyaddingthefollowinglinestothe.loginorthe.cshrc
file(assumingMFIXwasinstalledinthehomedirectory,andyouareusingtheCshell):
alias mkmfix sh ~/mfix/model/make_mfix
alias post ~/mfix/post_mfix/post_mfix
Afteraddingthealiasesinthe.loginor.cshrcfile,theusershouldlogoutandloginor
type:source.loginsothatthealiasesarefunctional.Thisstepneedstobedoneonly
once.Thenthemfixmakefilecanbeinvokedfromanydirectorybytypingmkmfix,and
thepost-processorcanbeactivatedbytypingpost.Thecreationandutilizationof
aliasesisnotrequiredtouseMFIX.Aliasesprovideconvenientshortcutstocommon
commands.
Notethatmakefileshouldbeinvokedasshmake_mfix.Erroneously
invokingitasmake_mfixwillcausetheuser-definedfilesnottobeused
forthebuild.Thealiasforpost_mfixwillbeoperationalwhenpost_mfixis
compiled(seesection2.3.2).
MFIX2013-2Readmefile
Page12of113
4.3. Creationofexecutablefiles
InstallingMFIXonlyrequirestoconvertthesourcecodeintoanexecutablefile.Thisis
calledthecompilationofthecode.YouneedaFortrancompilertocompileMFIX.Before
continuing,makesureyouhaveaworkingFortrancompileronyourcomputer.Please
contactyoursystemadministratorifyouarenotsurehowtoproperlyinstallandtestthe
compiler.
ThedistributionofMFIXprovidestwosetsofsourcecodes:
Name Purpose Locationof
sourcecode
Nameof
executable
MFIX Multiphaseflowsolver ~/mfix/model mfix.exe
POSTMFIX Simplepostprocessingofthedata.
Thisisatext-basedprogram.Data
isextractedbasedon(I,J,K)location
inthecomputationaldomain.
~/mfix/post_mfix post_mfix
Theopen-sourcevisualizationtoolsParaViewandVisItcanbeusedtovisualizeand
post-processMFIXresults.Theycanbedownloadedfrom:
ParaView: http://www.paraview.org/
VisIt: https://wci.llnl.gov/codes/visit/home.html
PleasefollowtheinstructionsontheabovewebsitestoinstallParaVieworVisIt.
MFIX2013-2Readmefile
Page13of113
4.3.1. MFIXMakefiles
BothMFIXandPOSTMFIXarecompiledthroughamakefile,calledmake_mfixforMFIX
andmake_postforPOSTMFIX.Itisnotexpectedthatthesefilesneedtobemodified,
butexpertusersmayeditthemakefilestoaddcompilationsoptionsorflagspecificto
theirarchitecture.Thenextsectionfocusesonmake_mfix,duetotheavailabilityof
severalflags.Invokingmake_postisbestdescribedbyfollowingtheexampleinsection
2.3.3.
Basicusage
Invokemake_mfixwithoutargumentstogothroughthelistofoptions.Thisisthe
standardinputmethodwheretheusermanuallyanswersquestionstocompileMFIX.To
invokethemakefile,type
sh ~/mfix/model/make_mfix
or
mkmfix
ifyoucreatedthealias(section2.2).Thefollowingexamplesassumethealiasis
created.
Compilingwithdefaultoptions
Usethe-defaultflagtocompilewiththedefaultoptions:
-Serial,optimizedcode
-Re-compilationofsourcefilesisnotforced
-GNUFortrancompiler
mkmfix -default
Repeatingacompilation
Usethe-repeatflagtorecompilewiththesameoptionsasthelastsuccessful
compilation.
mkmfix repeat
Showingallcompileroptions
Somecompilersavailableonveryspecificsystemsarehiddenbydefault.Usethe-long
MFIX2013-2Readmefile
Page14of113
flagtodisplayallcompileroptions.
mkmfix -long
Cleaning-upapreviouscompilation
Usethe-cleanflagbeforedoingafreshcompilation.Thisoptionwillremoveall.o,.a
and.modfilesfromtheobjectdirectory(lastcompilation).Themakefilemustbeinvoked
againifanewcompilationisneeded.
mkmfix -clean
mkmfix
Showingahelpmessage
Usethe-helpflagtodisplayahelpmessagethatsummarizesavailableoptions.
mkmfix -help
Shortcuts
Eachflagdescribedabovehasanequivalentshortversionforconvenience:
Description Flag Shortcut
Clean-upapreviouscompilation -clean -c
Defaultoptions(serial,optimized,GNU) -default -d
Displayhelp -help -h
Showallcompileroptions -long -l
Repeatcompilationwithsameoptionsasprevious -repeat -r
Forexample,tocompilewithdefaultoptions,thefollowingtwocommandsare
equivalent:
mkmfix -default
mkmfix -d
MFIX2013-2Readmefile
Page15of113
4.3.2. CompilingMFIXforthefirsttime:Astep-by-stepexample
BeforecompilingMFIX,youmustbesuretohaveaworkingFortrancompilerinstalled
onyourcomputer(i.e.,cancompileasimpleFortrancodesuchasprinthelloandlinkto
createanexecutable).Inthefollowingexample,itisassumedthatthegfortrancompiler
isinstalledona64-bitcomputer.MFIXwillbecompiledandrunforasimplefluidbed
tutorialcase.Atthispoint,itisnotimportanttounderstandthesimulationsetup.The
executablefilemfix.exewillbecreatedforserialexecution.
1)Gotothetutorialdirectory:
cd ~/mfix/tutorial/fluidbed1
2)Thisfoldercontainstheinputfilemfix.datthatcontainsthesimulationsetup.Thisfile
isnotrequiredtocompileMFIX,butwillbeusedattheendofthisexampletorunthe
simulation.MFIXcanbecompiledfromanydirectory,exceptthe/mfix/modeldirectory.
ThedirectorywhereMFIXwillberuniscalledtherundirectory.Heretherundirectoryis
fluidbed1,andcurrentlyonlycontainsthemfix.datfile.Displaythecontentofthe
directory:
ls
3)CompileMFIX
3a)Invokethemakefile.
mkmfix
3b)Youwillbepromptedtoanswer3questions.PressEntertokeepthedefault
answerstoall3questions.ThiswillcompileMFIXinoptimizedserialmode.
==============================================================
Mode of execution:
==============================================================
[1] Serial
[2] Parallel, Shared Memory (SMP)
[3] Parallel, Distributed Memory (DMP)
[4] Parallel, Hybrid (SMP+DMP)
MFIX2013-2Readmefile
Page16of113
Select the mode of execution [1] : Press Enter
==============================================================
Level of Optimization:
==============================================================
[0] None (Debug mode)
[x] Level 1 (not available)
[x] Level 2 (not available)
[3] Level 3 (most aggressive)
Select the level of optimization [3] : Press Enter
==============================================================
Option to re-compile source files in run directory:
==============================================================
[1] Do not force re-compilation
[2] Force re-compilation
Select Option to re-compile source files in run directory [1] : Press Enter
3c)Next,alistofcompilersforwhichthemakefileisconfiguredisdisplayed.Itdoesnot
meantheyareactuallyallinstalledonyourmachine.Chooseacompilerthatyouknow
isproperlyinstalledonyourmachine.Wewillselectgfortranasanexample:
3d)Thecompilationshouldstartandmaytakeseveralminutestocomplete.Oncethe
compilationissuccessful,theexecutablefilemfix.exeiscreatedandreadytouse.
*******************************************
Compilation successful: mfix.2013-2 created
To run MFIX type: mfix.exe
*******************************************
4)RunMFIX:
./mfix.exe
Asthesolutionproceeds,alotofinformationisdisplayedonthescreen.Pleasesee
section4foradescriptionoftheoutput.Therunshouldcompleteinafewminutes.
4.3.3. CompilingPOSTMFIX
YoucanusePOSTMFIXtoextractdataataparticularlocationintheflowfield.To
compilePOSTMFIX,followthefollowingprocedure.Again,itisassumedthatgfortranis
installed.
1)Gotothepost_mfixfolder:
cd ~/mfix/post_mfix
2)Invokethemakefile:
sh make_post
3)Alistofcompilerswillbedisplayed,basedonyouroperatingsystem.Again,thislist
meansthemakefileisconfiguredtousethosecompilers,butdoesnotimplytheyare
installedonyourcomputer.Inourcase,wewillselectthegfortrancompiler.Answering
no(n)tothefirstthreequestionswillselectgfortran.
MFIX2013-2Readmefile
Page18of113
Linux system with 64 bit processor detected, please select compiler
MFIX Compilation directives available for following compilers:
- Intel Fortran Compiler (IFORT - FCE for 64 bit)
- Portland Group Linux Fortran Compiler (pgf90)
- PathScale compiler (pathf90)
- gfortran
Do you want to compile with Intel Compiler? (y/n) [yes] n Type n and press Enter
Do you want to compile with Portland Group Compiler? (y/n) [yes] n Type n and press
Enter
Do you want to compile with PathScale Compiler? (y/n) [yes] n Type n and press Enter
gfortran selected
4)Beforecontinuing,deleteobjectfiles:
Object files (*.o, *.mod, *.a) in mfix/model will be deleted. Continue? (y/n) [no] y Type y
and press Enter
5)Thecompilationwillstart,anduponsuccessfulcompilation,thefollowingmessage
willbedisplayed:
********************************************
* Compilation successful: post_mfix created*
********************************************
Oncepost_mfixissuccessfullycompiled,thealiascreatedinSection2.2isoperational.
MFIX2013-2Readmefile
Page19of113
4.4. VisualizingDatawithParaView
ItisassumedyouhavedownloadedandinstalledasuitablebinaryversionofParaView.
TovisualizeMFIXresults,LaunchParaView,andgotoFile>Open,(orclickonthe
icon)andselectthe.RESfileintherundirectory.Forexample,tovisualizetheresults
fromthefluidbed1tutorial,opentheBUB01.RESfile.Next,clickonthegreenApply
button ontheleftpanetoloadallvariables.Thisstepmaybeoptionalonyour
versionofParaView.Youwillseeacontourplotofthevoidfraction(EP_g).Toshowan
animationofvoidfraction,presstheplaybuttonintheanimationtoolbar .
Youwillseebubblesformingalongtheleftboundaryandmovingupward.Thistutorialis
usinga2Dcylindricalcoordinatesystem,andtheleftboundaryistheaxisofsymmetry
ofthesystem.Onlyonesidewassimulatedduetosymmetry.Tovisualizetheentire
system,gotoFilter>Alphabetical>Reflect.IntheObjectinspector,selectPlaneX,and
Center0,andclickApply.Youshouldseethecompletesymmetricsystemnow,with
bubblesforminginthecenter.
MFIX2013-2Readmefile
Page20of113
4.5. StartingaNewRun
IfyouhavesuccessfullycompletedyourfirstcompilationofMFIXasdescribedin
Section2.3.1,youarereadytoexploreotheroptionstocompileandrunMFIX,withyour
ownsimulationsetup.
Createaseparatesubdirectoryforeachrun,referredtoastherundirectory.
CreateanMFIXexecutablefilebytypingmkmfix.TheMFIXexecutablefilemfix.exewill
becreatedandcopiedintotherun-directory.
First,selectthetypeofexecutable(currently,onlyserialandDMPoptionsare
available).Regardlessoftheoptionchosenhere,theexecutableisalwaysnamed
mfix.exe
==============================================================
Mode of execution:
==============================================================
[1] Serial
[2] Parallel, Shared Memory (SMP)
[3] Parallel, Distributed Memory (DMP)
[4] Parallel, Hybrid (SMP+DMP)
Select the mode of execution [1] :
Type1forserialcodeor3forDMPcodeandpressEnter.
Note:Tokeepthedefaultanswer(1=serial),justpressEnter.
IfyouwanttomodifyMFIXsubroutines,dothefollowing.Copythe
subroutinefromthemfix/modeldirectoryintotherundirectory.Modifythe
filecopiedtotherundirectory.Donotmodifythefilesinthemfix/model
directory.
MFIX2013-2Readmefile
Page21of113
Next,selectthelevelofoptimization:
==============================================================
Level of Optimization:
==============================================================
[0] None (Debug mode)
[x] Level 1 (not available)
[x] Level 2 (not available)
[3] Level 3 (most aggressive)
Select the level of optimization [3] :
Type0andpressEnterforexecutableindebugmode.Thisoptionisusefulifyou
modifiedsomesourcefilesandwanttotestthecodeforpossiblebugsbefore
productionrun.Executiontimewillbemuchslowerindebugmodethaninoptimized
mode.
PressEntertokeepthedefaultanswer(3).Thiswillgenerateanoptimizedexecutable,
whichwillrunfasterforproductionrun.
==============================================================
Option to re-compile source files in run directory:
==============================================================
[1] Do not force re-compilation
[2] Force re-compilation
Select Option to re-compile source files in run directory [1] :
IfyouintendtocompiletheDMPversionofMFIX,pleaseverifythatyour
MPIinstallationworksproperly(seeMPI_verification_for_MFIX.pdf
documentin/mfix/tools/mpi).Contactyoursystemadministratorifyouare
notsurehowtoproceed.
MFIX2013-2Readmefile
Page22of113
Type2andpressEntertomakesuresourcefilesintherundirectoryarecompiled.This
optionisneededonlyintherareinstanceswhentherundirectorycontainsamodulefile
(e.g.,run_mod.f)andanotherfile(e.g.,usr0.f),inwhichthecorrespondinguse
statementhasbeeninserted(e.g.,userun).Themakefilewillnotbeawareofthis
dependency(usr0dependsuponrun).So,inthisexample,changesmadeinrun_mod.f
willnotcausethe(necessary)recompilationofusr0.f,unlessthisoptionisselected.
PressEntertokeepthedefaultanswer(1).
IfyoukeepalltheabovedefaultoptionsbypressingEnterforeachquestion,an
optimizedserialversionexecutablewillbeproducedforthatparticularplatform.
Finally,alistofcompilersisproposedforyoursystem:
==============================================================
MFIX Compilation directives available for following compilers:
==============================================================
[1] GNU (gfortran) version 4.3 and above
[2] Portland Group (pgf90) version 11.7 and above
[3] Intel (ifort) version 11.1 and above
Select the compiler to compile MFIX? [1]
Typethenumbercorrespondingtothecompileryouwanttouse,andpressEnter.Ifyou
wanttousethedefaultoption(1=GNUgfortran),justpressEnter.
Afterselectingthecompiler,thecompilationprocesswillstart.Attheendofthe
compilationprocess,youshouldhavetheexecutablemfix.exeinthisdirectory.
IfyouhavecompiledMFIXonce,youcanrunmake_mfixwiththesame
optionsbyinvokingthemakefilewiththeflagrepeatorr.Forexample
mkmfix r
willrepeatthecompilationprocesswiththelastknownconfiguration.This
isusefulifyoucompileMFIXmanytimesduringyourowndevelopment
phase,anddonotwishtokeepenteringthesameinputoverandover.
MFIX2013-2Readmefile
Page23of113
WriteanMFIXdatafileandnameitmfix.dat.Thekeywordsarelistedinsection5.
Examplesareavailableinthemfix/tutorialsdirectory.
SerialExecution
WhenMFIXruns,itdisplayssomeoutputonthescreen.Thereareseveraloptionsto
runMFIXwithdifferentwaystomanagethescreenoutput:
Command Purpose
./mfix.exe
StandardwaytorunMFIX.Theoutputis
displayeddirectlyonthescreen.
./mfix.exe &
Sameasabove,withMFIXrunninginthe
background.
./mfix.exe > screen.log &
Runinbatchmodewiththescreenoutput
redirectedtothefilescreen.log.Tofollow
thescreenoutputatruntime,typetail f
screen.log.PressCtrl+Ctostopfollowing
thescreenoutput.(Notethatthefile
screen.logcanbecomeverylarge.).
./mfix.exe |& tee screen.log
Displaystheoutputonthescreenand
savesitintothescreen.logfile.Thisoption
isavailableonlyforcshortcshrcshell
users.
Note:youmaybeabletousemfix.exeinsteadof./mfix.exe(i.e.withoutthedotand
slash)onyourcomputerifyouhaveyour$PATHenvironmentvariabledefinedproperly
forcurrentworkingdirectory.
Youshouldrunseveraltutorialsandcarefullystudythecorresponding
mfix.datbeforeattemptingtocreateyourowninputfile.Itisstrongly
recommendedtostartwithanexistingmfix.datfromatutorialthatclosely
matchesyoursetup,andmodifythisfile.
MFIX2013-2Readmefile
Page24of113
ParallelExecution
RuntheDMPversionusingmpirun -np <Number of Processors> mfix.exe.Thiscommand
maybedifferentonothermachines(e.g.,mpprun -n <Number of Processors> mfix.exe).
RecentversionsofMPIlibrary(i.e.,MPICH2onLinuxclusters)requirempidaemons
runningonthecomputenodespriortothelaunchofanympiexecutable.Pleasemake
suretheappropriateMPIinitializationproceduresarefollowedandthesimpleMPI
examplesrunsuccessfullytoverifyMPIsetuppriortothelaunchofMFIXexecutablein
DMPmode.
NotethatMFIXresultscanberetrieved,evenwhiletherunisinprogress.
Toretrieveandmanipulatedataandtocreatespecialrestartfiles,runthe
post_processorpost_mfixbytypingpost.post_mfixwillprompttheuserfortherun
name.Entertherunname(e.g.,BUB01).
4.6. ModifyingthePost-ProcessingCodes
Tomakepost_mfix,firstchangethedirectorytothemfix/post_mfixdirectory.Ifuser-
definedpost-processingisrequired,modifytheusr_post.ffileinthedirectory.Thentype
shmake_post.Notethatthemfix/modelisrequiredforcreatingapost_mfixexecutable.
5. SettingUpandRunningMFIXonWindowsWorkstation
5.1. InstallingMFIXonWindowsOS
Thisisnotverywellsupported;pleaseseeourdownloadpage
(https://mfix.netl.doe.gov/members/download.php)forspecialremarks
(https://mfix.netl.doe.gov/members/wininst.html)andalsoearlierpostingsonmfix-help
mailinglist.
5.2. InstallingtheMFIXCodeusingCygwinonWindowsOS
1. InstallCygwinfrom http://www.cygwin.com/.TogetmorefamiliarwithLinux/Unix-
youcandoagooglesearchonunixprimer
(http://www.google.com/search?q=unix++primer)oryoucanseethetophit
(http://bignosebird.com/unix.shtml)
2. CheckthatDevelandEditorsareinstalled(Totherightofthewordswillbe"default";
Leftbuttonclickontheword"default"untilitsays"install")
3. Makesurethatmakeandexareinstalled
MFIX2013-2Readmefile
Page25of113
$whichex
/usr/bin/ex
$whichmake
/usr/bin/make
4. Nowinstallgfortran(thisisnowpartofgcc)
Checkthatgfortranisavailable(bytypinggfortranonconsole,youshouldget
'gfortran:noinputfiles')
5. DownloadMFIXfromourwebsite,andgotothedirectorywheretheMFIXtarball
wassaved.
6. issuethiscommand"tar-xzvfmfix.tar.gz"
7. gototutorials/fluidbed1bytyping"cdmfix/tutorials/fluidbed1"
8. Issuethecommand"sh../../model/make_mfix"
Thisshouldstartthecompilationprocessanddependingonthecomputerthis
mighttakealongtime.
Attheendyoushouldhavetheexecutablemfix.exeinthisdirectory.Tolist
thefilesyoucanusethe'ls'command
9. Nowissuethecommand"nohup./mfix.exe>out1&"-thiswilllaunchtheprogramin
thebackground.
10. Youcanseetheoutputfromtheoutfilebyissuingcommand"tail-fout1".Thiswould
stopassoonastheprogramfinishedexecuting.
11. YoucanvisualizetheoutputusingParaView(http://www.paraview.org).
12. Anyquestionscheckthearchivesofmfix-helpandifyouarestillhavingaproblem,
emailmfix-help@mfix.netl.doe.govbyprovidingthefollowingimportantdetailsin
yourmessageafterthedescriptionoftheproblemencountered:
1. MFIXversionyouaretryingtoinstallorrun
2. Somedetailsonyouroperatingsystemenvironment(forLinux:copyand
pastetheresponseofunameacommand,Linuxdistributionnameand
versionalso)
3. Yourcompilernameandversionnumber(e.g.ifortvwillgivetheversion
numberforIntelfortrancompiler)
4. Outputforyour$PATHenvironment(incshtypeecho$PATH)
5. YourMPIlibrarynameandversionnumber(ifcompilationsproblemwith
DMPmodeencounteredbutmakesureyoucancompileandrunasimple
helloworldtypeMPIprogramwithyourcurrentinstallation)Alsoplease
providehardwaredetailssuchasnumberofcorespersocketinyour
system(orsendtheoutputforcat /proc/cpuinfo andhowmanycores
youaretryingtoutilize.
MFIX2013-2Readmefile
Page26of113
6. MFIXatRunTime
6.1. MFIXOutputandMessages
MFIXoutputisstoredinnine*.SPxbinaryfiles.Therestartinfoisperiodicallywrittento
the*.RESbinaryfile.Thetextfile*.OUTechostheinput,showsthenumericalcell
distribution,and,ifOUT_DTisdefined,printsthefieldvariablesatthespecified
intervals.
Thetextfile*.LOGcontainsruninformation.FortheDMPversion,aLOGfileiscreated
foreachoftheprocessorsandtheyarenumberedasName###.LOG.
Messagesabouttherunarewrittentothe.LOGfile.Theprogressoftherunwillbe
displayedattheterminalasshownbelowifthedatafilespecifiesFULL_LOG=.TRUE.
Thefirstlineshowsthetime,thetime-step,andtheCPUtimeremainingtocompletethe
run.TheCPUtimeremainingisnotaccurate,especiallyinthebeginningoftherun.For
eachtime-step,thenormalizedresidualsforvariousequationsarewrittenoutevery
iteration.
MFIXusesavariabletimestep,whichisautomaticallyadjustedwithinuser-defined
limitstoreducetheruntime.AtlargevaluesofDt,theiterationsmaynotconverge.
Whenthishappens,thetimestepsizeissuccessivelyreduceduntilconvergenceis
obtained.Messagesaboutdivergenceandrecoveryaredisplayedontheterminalandin
the.LOGfile,ifFULL_LOG=.TRUE.
Thesubsequentlinesdisplaytheiterationnumber,thenormalizedresidualsforvarious
equations(e.g.,gascontinuity,solidscontinuity,xandygasmomentum,andxandy
solidsmomentum),andtheequationwiththemaximumresidual.TheresidualsP0and
P1arenormalizedonlywhenNit>1.Theresidualsdisplayedcanbeselectedwiththe
keywordRESID_STRING.
MFIX2013-2Readmefile
Page27of113
MFIXreportserrorswhilereadingthedatafile,whileprocessinginputdata,andduring
theruntime.Errorsinreadingthedatafileandinopeningfilesarereportedtothe
terminal.Allothererrorsarereportedinthe.LOGfile.
Whilereportingerrorsinreadingthedatafile,MFIXdisplaystheoffendinglineofinput,
sothattheerrorcanbeeasilydetected.Thepossiblecausesoferrorare(1)incorrect
formatforthename-listinput,(2)unknown(misspelt)variablename,or(3)the
dimensionofthename-listitemistoosmall.Forexample,ifthedimensionofDXisset
as5000(DIM_Iinparam_mod.f),andiftheinputdatafilecontainsanentryDX(5001),
MFIXwillreportaninputprocessingerror.
Whileprocessingtheinputdata,MFIXwillreporterrorsifthedataspecifiedis
insufficientorphysicallyunrealistic.MFIXwillsupplydefaultvaluesonlywhenitis
certainthatgivingadefaultvalueisreasonable.
Anoccasionalinput-processingerroristheinabilitytodeterminetheflowplanefora
boundarycondition.Theboundaryplanesdefinedintheinputdatafilemusthaveawall-
cellononesideandafluid-cellontheotherside.Iftheinitialconditionisnotspecified
forthefluid-cell,MFIXwillnotrecognizethecellasafluid-celland,hence,MFIXwillbe
unabletodeterminetheflowplane.
EveryNLOGnumberoftimesteps,MFIXmonitorswhetherthemassfractionsaddupto
1.0;theoverallreactionratesadduptozero;theviscosities,conductivities,andspecific
heatsaregreaterthanzero;andthetemperaturesarewithinthespecifiedlimits.A
messagewillbeprintedoutifanyerrorsareencountered.Therunmaybeaborted
dependingupontheseverityoftheerror.EveryNLOGtimestep,MFIXwillprintoutthe
numberofiterationsduringtheprevioustimestepandthetotalsolidsinventoryinthe
reactor.
Forthespecifiedmass-outflowcondition,aftertheelapseoftimeBC_DT_0,MFIXprints
outtime-averagedmassflowrates.Forcyclicboundaryconditions,MFIXwillprintout
thevolumeaveragedmassfluxeseveryNLOGtimestep.
Amessageiswrittentothe.LOGfilewheneverthe.RESand.SPxfilesarewritten.This
messagealsoshowsanapproximatevalueofthecumulativediskspaceusagein
megabytes.
MFIX2013-2Readmefile
Page28of113
6.2. RestartingaRun
ArunisrestartedbyrerunningMFIXaftertypingRUN_TYPE='restart_1'inmfix.dat.
Theold.OUTfilewillbeoverwritten.The.LOGmessageswillbeappendedtotheold
.LOGfile.
6.3. WhentheRunDoesNotConverge
Initialnon-convergence:Ensurethattheinitialconditionsarephysicallyrealistic.Ifinthe
initialtimestep,therundisplaysNaN(Not-a-Number)foranyresidual,reducetheinitial
timestep,sinceautomatictimestepreductionwillbecomeineffective.Iftimestep
reductionsdonothelp,rechecktheproblemsetup.
Holdingthetimestepconstant(DT_FAC=1)andignoringthestallingofiterations
(DETECT_STALL=.FALSE.)mayhelpinovercominginitialnonconvergence.Oftena
betterinitialconditionwillaidconvergence.Forexample,usingahydrostaticratherthan
auniformpressuredistributionastheinitialconditionwillaidconvergenceinfluidized-
bedsimulations.
Iftherearecomputationalregionswherethesolidstendtocompact(i.e.,solidsvolume
fractionlessthanEP_star),theconvergencecanbeimprovedbyreducingUR_FAC(2)
belowthedefaultvalueof0.5.
Convergenceisoftendifficultwithhigherorderdiscretizationmethods.Firstorder
upwindingmaybeusedtoovercomeinitialtransientsandthenthehigherordermethod
maybeturnedon.Also,higher-ordermethodssuchasvanLeerandminmodgivefaster
convergencethanmethodssuchassuperbeeandULTRA-QUICK.
MFIX2013-2Readmefile
Page29of113
7. KeywordsinInputDataFile(mfix.dat)
[]indicatesthedefaultvalue.
Thesymbolsusedinthetableareasfollows:
Dimension Description Type Description
1 Cellnumberinx,y,orzdirection C Character
M Solids-phasenumber DP DoublePrecision
N Speciesnumber I Integer
Ic Initialconditionnumber L Logical
Bc Boundaryconditionnumber
Is Internalsurfacenumber
Usr User-definedoutputnumber
MFIX2013-2Readmefile
Page30of113
7.1. RunControl
Keyword(dimension) Type Description
RUN_NAME C Nameusedtocreateoutputfiles.Thenameshould
belegalafterextensionsareaddedtoit;e.g.,for
runnameBUB01,theoutputfilesBUB01.LOG,
BUB01.OUT,BUB01.RES,etc.,willbecreated.
DESCRIPTION C Problemdescriptionin60characters.
UNITS C Unitsfordatainputandoutput.
[CGS] AllinputandoutputinCGSunits(g,cm,s,cal).
SI AllinputandoutputinSIunits(kg,m,s,J).
RUN_TYPE C Typeofrun.
NEW Newrun.
RESTART_1 Normalrestartrun.Initialconditionsfrom.RESfile.
RESTART_2 Startanewrunwithinitialconditionsfroma.RES
filecreatedfromanotherrun.
RESTART_3 ContinueoldrunasinRESTART_1,butanyinput
datanotgiveninmfix.datisreadfromthe.RESfile.
(Donotuse)
RESTART_4 StartanewrunasinRESTART_2,butanyinput
datanotgiveninmfix.datisreadfromthe.RESfile.
(Donotuse)
TIME DP Start-timeoftherun.
TSTOP DP Stop-timeoftherun.
DT DP Startingtimestep.IfDTisnotdefined,asteady-
statecalculationwillbeperformed.
DT_MAX
[1.0]
DP Maximumtimestep.
DT_MIN
[1E-6]
DP Minimumtimestep.
MFIX2013-2Readmefile
Page31of113
DT_FAC
[0.9]
DP Factorforadjustingtimestep.Shouldbelessthan
1.
Useavalueof1toholdthetimestepconstant.
DETECT_STALL L
[.TRUE.] Reducetimestepiftheresidualssumdoesnot
decrease.
.FALSE. Donotreducetimestepforstallediterations.
MODEL_B L Momentumequations.
[.FALSE.] ModelA
.TRUE. ModelB
MOMENTUM_X_EQ(m) L (m=0indicatesgasphase)
[.TRUE.] SolveX-momentumequationsofphasem.
.FALSE. DonotsolveX-momentumequationsofphasem.
Bewareofinconsistencieswhenthemomentum
equationsareturnedoff;e.g.,2-Ddevelopingflow
withonlyY-momentumshouldnotspecifyno-slip-
walls.
MOMENTUM_Y_EQ(m) L (m=0indicatesgasphase)
[.TRUE.] SolveY-momentumequationsofphasem.
.FALSE. DonotsolveY-momentumequationsofphasem.
MOMENTUM_Z_EQ(m) L (m=0indicatesgasphase)
[.TRUE.] SolveZ-momentumequationsofphasem.
.FALSE. DonotsolveZ-momentumequationsofphasem.
ENERGY_EQ L
[.TRUE.] Solveenergyequations
.FALSE. Donotsolveenergyequations
SPECIES_EQ(m) L (m=0indicatesgasphase)
MFIX2013-2Readmefile
Page32of113
[.TRUE.] Solvespeciesequationsofphasem.Tosolve
speciesequationwithnochemicalreactions,copy
thefilemfix/model/rrates.fintorundirectoryand
removethefirsttwoexecutablelinesasexplained
inthecomments.Nootherchangeisneededin
thatfile.
.FALSE. Donotsolvespeciesequationsofphasem.
GRANULAR_ENERGY
[.FALSE.]
L Usethegranularenergytransportequation(pde)
asopposedtothealgebraic(alg)equation
formulation.
SIMONIN
[.FALSE.]
L UseSimoninmodel(see
~mfix/doc/Simonin_Ahmadi_Models.pdffordetails).
AHMADI
[.FALSE.]
L UseAhmadimodel(see
~mfix/doc/Simonin_Ahmadi_Models.pdffordetails).
JENKINS
[.FALSE.]
L UseJenkinssmallfrictionalboundarycondition
(see~mfix/doc/Simonin_Ahmadi_Models.pdffor
details).
FRICTION
[.FALSE.]
L UsetheSchaeffermodelwhen.FALSE.,orusethe
Princetonmodelwhen.TRUE.
ThecombinationofthekeywordsGRANULAR_ENERGYandFRICTIONinvokes
differentsolidsstressmodelsasshownbelow:
GRANULAR_ENERGY=.FALSE.
EP_g<EP_star>Schaeffer
EP_g>=EP_star>viscous(algebraic)
GRANULAR_ENERGY=.TRUE.
FRICTION=.TRUE.
EP_s(IJK,M)>EPS_f_min>Princeton+viscous(pde)
EP_s(IJK,M)<EPS_f_min>viscous(pde)
FRICTION=.FALSE.
EP_g<EP_star>Schaeffer+viscous(pde)
EP_g>=EP_star>viscous(pde)
MFIX2013-2Readmefile
Page33of113
Keyword(dimension) Type Description
SAVAGE I Foratermappearinginthefrictionalstressmodel
invokedwithFRICTION=.TRUE.
0 UseS:Sinthefrictionalstressmodel.
[1] UseanalternateformsuggestedbySavage.
2 Anappropriatecombinationoftheabovetwoforms.
SCHAEFFER L
[.TRUE.] IfsettofalsewithFRICTION=.FALSE.,thenthe
modelwillnothaveanyfrictionalviscosity.
BLENDING_STRESS
[.FALSE.]
L Thiswillturnontheblendingfunctiontoblendthe
Schaefferstresseswiththatofkinetictheoryaround
*.Thedefaultishyperbolictangentfunctionfor
blending(TANH_BLEND=.TRUE.)andonecould
alsoutilizeascaledandtruncatedsigmoidal
function(SIGM_BLEND=.TRUE.).
YU_STANDISH L
[.FALSE.] UseYuandStandishcorrelationtocompute
maximumpackingforpolydispersesystems.
FEDORS_LANDEL L
[.FALSE.] UseFedorsandLandelcorrelationtocompute
maximumpackingforabinary(only)mixtureof
powders.
CALL_USR L
.TRUE. Calluser-definedsubroutines.
[.FALSE.] Donotcalluser-definedsubroutines.
NRR
[0]
I Thenumberofuserdefinedchemicalreactions
storedinthe*.SPAfile.SeeSection4.10Chemical
Reactions.
MFIX2013-2Readmefile
Page34of113
k-EquationforGas-
PhaseTurbulence
Thenumericalparameters(likeunder-relaxation)
arethesameastheonesforSCALAR(index=9)
Mu_gmax,whichisthemaximumvalueofgas
turbulentviscositymustbesetinordertousetheK-
Epsilonmodel.Thereisnodefaultforthisvalueand
thecodewillnotrunifMu_gmaxisnotset.Avalue
Mu_gmax=1.E+03isrecommended(itisonlyused
incalc_mu_g.f)
Allwallsmustbedefined(NSW,FSWorPSW)in
ordertousestandardwallfunctions.Ifauserdoes
notspecifyawalltype,he/shewillnotobtainthe
typicalturbulentprofileinwall-boundedflows.
K_Epsilon
[.FALSE.]
L
Whenactivatedthek-turbulencemodel(for
single-phaseflow)issolvedusingstandardwall
functions.
KT_TYPE
[UNDEFINED_C]
C Solidsphasestressmodel.Modelsincludethe
kinetictheoriesofIddir&Arastoopour(AIChEJ,
2005):IA_NONEP;GarzoandDufty(PRE,1999):
GD_99;Garzo,HrenyaandDufty(PRE,2007):
GHD.Tospecifyakinetictheory
GRANULAR_ENERGYmustbe.TRUE.If
KT_TYPEisleftundefined(default)theviscous
modelisbasedonthetheoryofLunetal.(1984).
TheIAtheorywasmodifiedtoincludetheeffectsof
interstitialfluidontwotransportcoefficients
(conductivityandviscosity)aswellasaconsistency
checktoensurethatthestressesoftwoormore
identicalsolidsphaseswilladdtothatofasingle
solidsphase.Thesemodificationscanbeturnedoff
bychangingthedefaultvalueofswitch_IAto
.FALSE.inconstant_mod.f.NotethatfortheIA
theory,thedefinitionofgranulartemperature
includesparticlemass(unliketheLunetal.(1984)
theory).
GHDtheorymayonlybeusedwiththefollowing
dragtypes:Wen_YuandHYS.
MFIX2013-2Readmefile
Page35of113
DRAG_TYPE
[SYAM_OBRIEN]
C Dragmodelsinclude:SYAM_OBRIEN,
GIDASPOW,GIDASPW_PCF,
GIDASPOW_BLEND,GIDASPOW_BLEND_PCF,
WEN_YU,WEN_YU_PCF,KOCH_HILL,
KOCH_HILL_PCF,BVK,HYS.(seedrag_gs.ffor
details)
InthemodelSYAM_OBRIENtwoadditional
parametersmaybespecified:drag_c1anddrag_d1
(seesection5.2)
Theextension_PCFfollowingthespecifieddrag
modelindicatesthatthepolydispersecorrection
factorproposedbyBeetstraetal.(2007)is
implementedwiththatmodel.
IntheHYSdragmodelthereisalubricationcutoff
distancethatcanbespecifiedbytheuser(see
section4.2).Detailsofthisdragmodelcanbefound
in~/mfix/doc/HYS_drag.pdf
RDF_TYPE
[LEBOWITZ]
C Radialdistributionfunctionatcontactfor
polydispersesystemsinclude:LEBOWITZ,
MODIFIED_LEBOWITZ,MANSOORIand
MODIFIED_MANSOORI.
(DonotspecifyanyRDFformonodispersesystems.
Carnahan-Starlingistheonlyoptionavailable.)
ADDED_MASS
[.FALSE.]
L Whenactivatedtheadded(orvirtual)massforce
effectivelyactstoincreasetheinertiaofthe
dispersedphase,whichtendstostabilize
simulationsofbubblygas-liquidflows.
SUBGRID_TYPE
[UNDEFINED_C]
C Subgridmodelsinclude:IGCIandMILIOLI
FILTER_SIZE_RATIO
[2.0]
DP Ratiooffiltersizetocomputationalcellsize.
SUBGRID_WALL
[.FALSE.]
L Includewalleffectterminsubgridmodel.
MFIX2013-2Readmefile
Page36of113
7.2. PhysicalParameters
Keyword(dimension) Type Description
C(100) DP Userdefinedconstants.
C_NAME(100) C Nameofuser-definedconstants(20characterslong).
Thesecharacterstringsareusedonlytoidentify
user-definedconstants(c)inthe.OUTfile.
C_e DP Coefficientofrestitutionforparticle-particlecollisions.
(MFIX1.94keyword_e_).
e_w
[1.0]
DP Coefficientofrestitutionforparticle-wallcollisions.
PHIP
[0.6]
DP Specularitycoefficientassociatedwithparticle-wall
collisions.
PHIP_OUT_JJ
[FALSE]
L Outputthevariablespecularitycoefficientwhen
BC_JJ_Mis.TRUE..Thespecularitycoefficientwill
bestoredinReactionRatesarrayforpost-processing
bypost-mfix.UserneedstosetnRRto1forthis
purpose.Becarefulwiththissettingwhenreacting
flowissimulated.
PHIP0
[UNDEFINED]
DP Specifythevalueofspecularitycoefficientwhenthe
normalizedslipvelocitygoestozerowhenBC_JJ_M
is.TRUE..Thisvariableiscalculatedinternallyinthe
code.Donotmodifyunlessanaccuratenumberis
known.
C_f DP Coefficientoffrictionbetweentheparticlesoftwo
solidsphases.
Phi DP Angleofinternalfriction(indegrees).Setthisvalueto
zerototurnoffplasticregimestresscalculations.
Phi_w
[0.0]
DP Angleofinternalfriction(indegrees)atwalls.Setthis
valuetonon-zero(phi_w=11.31meanstan_phi_w=
Mu=0.2)whenusingJenkinsorBC_JJ_Mboundary
condition.
eps_f_min
[0.5]
DP Minimumsolidsfractionabovewhichfrictionsetsin.
(whenFRICTION=.TRUE.)
MFIX2013-2Readmefile
Page37of113
EP_S_MAX(MMAX)
[1.0ep_star]
DP Maximumsolidsvolumefractionatpackingfor
polydispersesystems(morethanonesolidsphase
used).ThevalueofEP_starmaychangeduringthe
computationifsolidsphaseswithdifferentparticle
diametersarespecifiedandYu_Standishor
Fedors_Landelcorrelationsareused.
SEGREGATION_SLO
PE_COEFFICIENT
[0.0]
DP Usedincalculatingtheinitialslopeofsegregation:
seeGeraetal.(2004)-recommendedvalue0.3.
Increasingthiscoefficientresultsindecreasein
segregationofparticlesinbinarymixtures.
L_scale0
[0.0]
DP Valueofturbulentlengthinitialized.Thismaybe
overwritteninspecificregionswiththekeyword
IC_L_scale.
Mu_gmax DP Maximumvalueoftheturbulentviscosityofthefluid.
V_ex DP ExcludedvolumeinBoyle-Massoudistress.
[0.0] B-Mstressisturnedoff.
P_ref
[0.0]
DP Referencepressure.
P_scale
[1.0]
DP Scalefactorforpressure.
GRAVITY DP Gravitationalacceleration.
[980.7] Bydefault,thegravityforceactsinthe_vey-
direction.Modifyfileb_force2.inctochangethebody
forceterm.
drag_c1anddrag_d1
drag_c1[0.8]
drag_d1[2.65]
DP QuantitiesforcalibratingSyamlal-OBriendrag
correlationusingUmfdata.Thesearedetermined
usingtheUmfspreadsheet
(http://www.mfix.org/members/develop/umf.xls).
Whentheseareundefinedthedefaultvaluesfor
theseconstantsareused.
USE_DEF_LAM_HYS
[.TRUE.]
L Ifsetto.TRUE.MFIXwillusedefaultlubrication
cutoff(LAM_HYS)of1masspecifiedinthe
drag_gs.ffilefortheHYSpolydispersedragmodel.If
setto.FALSE.theusermustspecifyalubrication
cutoffdistanceusingtheLAM_HYSkeywordgivenin
thenexttableentry.
MFIX2013-2Readmefile
Page38of113
LAM_HYS
[1m]
DP IfUSE_DEF_LAM_HYSissetto.FALSE.theuseris
abletospecifyavalueforthelubricationcutoff
distance(LAM_HYS).Inpracticethisnumbershould
beontheorderofthemeanfreepathofthegasfor
smoothparticles,ortheRMSroughnessofaparticle
iftheyarerough(ifparticleroughnessislargerthan
themeanfreepath).
M_AM I Dispersephasenumberwheretheaddedmass
applies.
MFIX2013-2Readmefile
Page39of113
7.3. NumericalParameters
Keyword(dimension) Type Description
MAX_NIT
[500]
I Maximumnumberofiterations.
NORM_g
[Usetheresidualfrom
thefirstiteration.]
DP Factortonormalizethegascontinuityequation
residual.
SettingNorm_g=0invokesanormalizationmethod
basedonthedominantterminthecontinuity
equation.Thissettingmayspeedupcalculations,
especiallynearasteadystateandforincompressible
fluids.Butthenumberofpressureiterationsmay
needtobeincreased,LEQ_IT(1),toensuremass
balance.
NORM_s
[Usetheresidualfrom
thefirstiteration.]
DP Factortonormalizethesolidscontinuityequation
residual.
SettingNorm_s=0invokesanormalizationmethod
basedonthedominantterminthecontinuity
equation.Thissettingmayspeedupcalculations,
especiallynearasteadystate.Butthenumberof
pressureiterationsmayneedtobeincreased,
LEQ_IT(2),toensuremassbalance.
TOL_RESID
[1E-3]
DP Maximumresidualatconvergence
(continuity+momentum).
TOL_RESID_Th
[1E-4]
DP Maximumresidualatconvergence(granularenergy).
TOL_RESID_T
[1E-4]
DP Maximumresidualatconvergence(energy).
TOL_RESID_X
[1E-4]
DP Maximumresidualatconvergence(speciesbalance).
TOL_RESID_Scalar
[1E-4]
DP Maximumresidualatconvergence(scalarbalances.)
MFIX2013-2Readmefile
Page40of113
TOL_DIVERGE
[1E+4]
DP Minimumresidualfordeclaringdivergence.Whenthe
fluidisincompressible,thevelocityresidualstake
largevaluesintheseconditeration(e.g.,1E+8)and
thendropdowntoalowvalueinthethirditeration
(e.g.,0.1).Insuchcases,itisdesirabletoincrease
thissetting.
Max_Inlet_Vel_Fac
[1]
DP Thecodedeclaresdivergenceifthevelocity
anywhereinthedomainexceedsamaximumvalue.
Thismaximumvalueisautomaticallydeterminedfrom
theboundaryvalues.Theusermayscalethe
maximumvaluebyadjustingthisscalefactor.
ThenextkeywordsLEQ_IT,LEQ_METHOD,LEQ_SWEEP,LEQ_TOL,UR_FAC,and
DISCRETIZEaredimensionedfortheninetypesofequations:
Index EquationType
1 gaspressure
2 solidsvolumefraction
3 gasandsolidsu-momentum
4 gasandsolidsv-momentum
5 gasandsolidsw-momentum
6 Temperature
7 speciesmassfractions
8 granulartemperature
9 user-definedscalar
Forexample,LEQ_IT(3)=10willmakeMFIXuse10linearequationiterationswhile
solvingthegasandsolidsu-momentumequation(EquationType=3).
MFIX2013-2Readmefile
Page41of113
[20for1and2]
[5for2-5]
[15for6-9]
I Numberofiterationsinthelinearequationsolver.
Theninevaluesarefortheninetypesofequations
notedabove.
ThesameconventionholdsforLEQ_METHOD,
UR_FAC,andDISCRETIZE.Iftheresidualofan
equationislessthantheconvergencecriterion,
MFIXmakesLEQ_ITequaltothelesserof5and
theuser-definedvalueandLEQ_METHODequalto
1.
LEQ_METHOD(9)
[2forallequations]
I Themethodusedinthelinearequationsolver:
1. SOR
2. BiCGSTAB
3. GMRES
5. CG
LEQ_SWEEP(9)
[RSRS]
C Thesweepdirectionusedinthelinearequation
solver.Thesweepdirectionforpreconditioningline
relaxation;e.g.,ifLEQ_SWEEP="ISIS",1sweep
withdoIKloopfollowedbysend_recv(repeated
twice),orifLEQ_SWEEP="RSRS",1red-black
sweepwithdoIKloopfollowedbysend_recv
(repeatedtwice),orifLEQ_SWEEP="ASAS",1
red-blacksweepwithdoIKloopfollowedbydoJK
followedbyIJfollowedbysend_recv(repeated
twice).OnlyusedbyBiCGSTABandCG.
LEQ_TOL(9)
[1.0D-4]
DP Thetolerance,ifused,inlinearequationsolvers.
OnlyusedbyBiCGSTABandCG.
LEQ_PC(9)
[LINE]
C Thepreconditionerusedforthesweepsinthelinear
solver
LINE-Linerelaxation
DIAG-DiagonalScaling
NONE-Nopreconditioner
MFIX2013-2Readmefile
Page42of113
UR_FAC(9)
[0.8for1,6,9]
[0.5for2,3,4,5,8]
[1.0for7]
DP Underrelaxationfactorsforseventypesof
equations.
ReducingUR_FAC(2)willhelpconvergencein
problemsinwhichthesolidstendtopack.
DEF_COR
[.FALSE.]
L Iftrue,usedeferredcorrectionmethodfor
implementinghigherorderdiscretization.Otherwise,
usedown-windfactormethod(default).
DISCRETIZE(9) I Discretizationschemeforseventypesofequations.
[0] First-orderupwinding.
1 First-orderupwinding(usingdown-windfactors).
2 Superbee(recommendedmethod).
3 SMART.
4 ULTRA-QUICK.
5 QUICKEST(doesnotwork).
6 MUSCL.
7 vanLeer.
8 Minmod.
FPFOI
[.FALSE.]
L Fourpointfourthorderinterpolationandisupstream
biased.Ifthisschemeischosenanddiscretize(*)<
2,discretize(*)isdefaultedto2.Ifyouchosethis
scheme,settheC_FACvaluebetween0and1.
C_FAC
[UNDEFINED]
DP Factorusedintheuniversallimiter(whenFPFOIis
set.TRUE.)andcanbeanyvalueintheset(0,1).
Thechoiceof1willgive(diffusion)firstorder
upwindingandasthisvaluebecomescloserto0the
schemebecomesmorecompressive.
CN_ON
[.FALSE.]
L ImplicitEulerbasedtemporaldiscretizationscheme
employed(firstorderaccurateintime).
.TRUE. Crank-Nicholsonbasedtemporaldiscretization
schemeemployed(secondorderaccurateintime
excludingtherestarttimestepwhichisfirstorder).
MFIX2013-2Readmefile
Page43of113
Chi_Scheme
[.FALSE.]
L Chi-Scheme,proposedbyDarwishandMoukalled
(2003),isactivated.Thisschemeguaranteesthat
thesetofdifferencedspeciesmassbalance
equationshasthepropertythatthesumofmass
fractionsadduptoone.Whenafluxlimiterisused
with(higherorder)spatialdiscretizationschemesit
isnotguaranteedthatthemassfractionsaddupto
one.Thisproblemmayberectifiedbyactivatingthe
chi-scheme.
UR_F_gs
[1]
DP Theimplicitnesscalculationofthegas-solidsdrag
coefficientmaybeunderrelaxedbychanging
UR_F_gs,whichtakesvaluesbetween0to1:
UR_F_gs=1(updateF_gseveryiteration)
UR_F_gs=0(updateF_gseverytimestep)
MFIX2013-2Readmefile
Page44of113
7.4. GeometryandDiscretization
For2Dsimulations,thethicknessofthethirddirectionspecifiedshouldbeexactifmass
orvolumetricflowrates,ratherthanvelocities,arespecifiedattheboundaries.
Keyword(dimension) Type Description
COORDINATES
[UNDEFINED_C]
C Coordinatesusedinthesimulation.
CARTESIAN Cartesiancoordinates.
CYLINDRICAL Cylindricalcoordinates.
NO_I L (Donotuse.)
[.FALSE.] X(r)directionisconsidered.
.TRUE. X(r)directionisnotconsidered.
IMAX I Numberofcellsinthex(r)direction.
DX(l) DP Cellsizesinthex(r)direction.Entervaluesfrom
DX(0)toDX(IMAX-1).(Useuniformmeshsizewith
higher-orderdiscretizationmethods.Alsoin
cylindricalcoordinatesDXshouldbekeptuniformfor
strictmomentumconservation.)
XMIN DP Theinnerradiusinthesimulationofanannular
cylindricalregion.
XLENGTH DP Reactorlengthinthex(r)direction.
NO_J L (Donotuse.)
[.FALSE] ydirectionisconsidered.
.TRUE. ydirectionisnotconsidered.
JMAX I Numberofcellsintheydirection.
DY(1) DP Cellsizesintheydirection.EntervaluesfromDY(0)
toDY(IMAX-1).(Useuniformmeshsizewithsecond-
orderdiscretizationmethods.)
YLENGTH DP Reactorlengthintheydirection.
NO_K L
MFIX2013-2Readmefile
Page45of113
[.FALSE.] z()directionisconsidered.
.TRUE. z()directionisnotconsidered.
KMAX I Numberofcellsinthez()direction.
DZ(1) DP
Cellsizesinthez()direction.Entervaluesfrom
DZ(0)toDZ(IMAX-1).(Useuniformmeshsizewith
second-orderdiscretizationmethods.)
ZLENGTH DP Reactorlengthinthez(direction.
CYCLIC_X L Flagformakingthex-directioncyclicwithoutpressure
drop.Nootherboundaryconditionsforthex-direction
shouldbespecified.
[.FALSE.] NocyclicconditionatX-boundary.
.TRUE. CyclicconditionatX-boundary.
CYCLIC_X_PD L Flagformakingthex-directioncyclicwithpressure
drop.IfthekeywordFlux_gisgivenavaluethis
becomesacyclicboundaryconditionwithspecified
massflux.Nootherboundaryconditionsforthex-
directionshouldbespecified.
[.FALSE.] NocyclicconditionatX-boundary.
.TRUE. CyclicconditionwithpressuredropatX-boundary.
DELP_X DP FluidpressuredropacrossXLENGTHwhenacyclic
boundaryconditionwithpressuredropisimposedin
thex-direction.
CYCLIC_Y L Flagformakingthey-directioncyclicwithoutpressure
drop.Nootherboundaryconditionsforthey-direction
shouldbespecified.
[.FALSE.] NocyclicconditionatY-boundary.
.TRUE. CyclicconditionatX-boundary.
CYCLIC_Y_PD L Flagformakingthey-directioncyclicwithpressure
drop.IfthekeywordFlux_gisgivenavaluethis
becomesacyclicboundaryconditionwithspecified
massflux.Nootherboundaryconditionsforthey-
directionshouldbespecified.
MFIX2013-2Readmefile
Page46of113
[.FALSE.] NocyclicconditionatY-boundary.
.TRUE. CyclicconditionwithpressuredropatY-boundary.
DELP_Y DP FluidpressuredropacrossYLENGTHwhenacyclic
boundaryconditionwithpressuredropisimposedin
they-direction.
CYCLIC_Z L Flagformakingthez-directioncyclicwithoutpressure
drop.Nootherboundaryconditionsforthez-direction
shouldbespecified.
[.FALSE.] NocyclicconditionatZ-boundary.
.TRUE. CyclicconditionatZ-boundary.
CYCLIC_Z_PD L Flagformakingthez-directioncyclicwithpressure
drop.IfthekeywordFlux_gisgivenavaluethis
becomesacyclicboundaryconditionwithspecified
massflux.Nootherboundaryconditionsforthez-
directionshouldbespecified.
[.FALSE.] NocyclicconditionatZ-boundary.
.TRUE. CyclicconditionwithpressuredropatZ-boundary.
DELP_Z DP FluidpressuredropacrossZLENGTHwhenacyclic
boundaryconditionwithpressuredropisimposedin
thez-direction.
SHEAR L If.TRUE.imposesameanshearontheflowfieldasa
linearfunctionof_x_coordinate.Thisfeatureshould
onlybeusedwhenCYCLIC_X=.TRUE.Also,the
keywordV-shneedstobeset.
V_sh DP Specifiesthemean_y_velocitycomponentatthe
easternboundaryofthedomain(V_sh),andthe
mean_y_velocity(-V_sh)atthewesternboundaryof
thedomain.
Flux_g
[UNDEFINED]
DP Ifavalueisspecified(inunitsofg/cm
2
.s),the
domain-averagedgasfluxisheldconstantatthat
valueinsimulationsoveraperiodicdomain.Apairof
boundariesspecifiedasperiodicwithfixedpressure
dropisthentreatedasperiodicwithfixedmass
flux.Evenforthiscaseapressuredropmustalso
bespecified,whichisusedastheinitialguessinthe
simulations.
MFIX2013-2Readmefile
Page47of113
7.5. GasPhase
Keyword(dimension) Type Description
RO_g0 DP Specifiedconstantgasdensity.Thisvaluemaybe
settozerotomakethedragzeroandtosimulate
granularflowinavacuum.Forthiscase,usersmay
turnoffsolvingforgasmomentumequationsto
accelerateconvergence.
MU_g0 DP Specifiedconstantgasviscosity.
K_g0 DP Specifiedconstantgasconductivity.
C_pg0 DP Specifiedconstantgasspecificheat.
DIF_g0 DP Specifiedconstantgasdiffusivity.
MW_AVG DP Averagemolecularweightofgas.
MW_g(n) DP Molecularweightofgasspeciesn.
7.6. SolidsPhase
Keyword(dimension) Type Description
MMAX
[1]
I Numberofsolidsphases.
D_p0(m) DP Initialparticlediameters,sameastheoldD_P(m).
RO_s(m) DP Particledensities.
MU_s0 DP Specifiedconstantgranularviscosity.Ifthisvalueis
specified,thenthekinetictheorycalculationis
turnedoffandP_s=0andLambda_s=-2/3
MU_s0.
K_s0 DP Specifiedconstantsolidsconductivity.
C_ps0 DP Specifiedconstantsolidsspecificheat.
DIF_s0 DP Specifiedconstantsolidsdiffusivity.
MW_s(m,n) DP Molecularweightofsolidsphase-m,speciesn.
MFIX2013-2Readmefile
Page48of113
EP_star DP Packedbedvoidfraction.
CLOSE_PACKED(m)
[.TRUE.]
L Indicateswhetherthesolidsphaseformsapacked
bedwithavoidfractionEP_star.
7.7. InitialConditions
Eachinitialcondition(IC)isspecifiedoverarectangularregion(orpie-shapedfor
cylindricalcoordinates)thatcorrespondstothescalarnumericalgrid.Theseare3D
regions:X_wX_e,Y_sY_n,andZ_tZ_b.Theregionisdefinedbytheconstant
coordinatesofeachofthesixfaces,whichmaybespecifiedasthephysicalcoordinates
orthecellindices.The
physicalcoordinatesareeasiertospecifythanthecellindices.Ifcellsizesarenotsmall
enoughtoresolvearegionspecifiedusingphysicalcoordinates,MFIXwillindicatethis
problemwithanerrormessage.
Incylindricalcoordinates,whenthethetadirectioncrossesthe0value,splitthatregion
intotworegions:e.g.,Splitaregionspanning1.9pito0.1pias1.9pito2piand0to0.1
pi.
Twoinitialconditionregionsmayoverlap.Whenanoverlapoccurs,MFIXusesthe
conditionsspecifiedforthehigherICnumber.
undefined.
MFIX2013-2Readmefile
Page53of113
PAR_SLIP_WALLor
PSW
Partialslipatthewallimplementedasdv/dn+h
w
(v
v
w
)=0,wherenisthenormalpointingfromthe
fluidintothewall.
Thecoefficientsh
w
andv
w
shouldbespecified.For
freeslipseth
w
=0.Fornoslipleaveh
w
undefined
(h
w
=)andsetv
w
=0.Toseth
w
=,leaveit
unspecified.
IfBC_JJ_PSisequalto1,theJohnson-Jackson
boundaryconditionisusedforsolids.
SpecificationsforWALLboundaryconditions:
Keyword(dimension) Type Description
Momentum
Equation
Partialslipatthewallimplementedasdv/dn+h
w
(v
-v
w
)=0,wherenisthenormalpointingfromthe
fluidintothewall.
IftheJohnsonandJacksonpartialslipboundary
conditionisnotused(i.e.,BC_JJ_PS(bc)=0),the
coefficientsh
w
andv
w
shouldbespecified.
Forfreeslipseth
w
=0.Fornoslipleaveh
w
undefined(h
w
=)andsetv
w
=0.Toseth
w
=,
leaveitunspecified.
BC_hw_g(bc)
[]
DP Gasphaseh
w
forpartialslipboundary.
BC_hw_s(bc,m)
[]
DP Solidsphaseh
w
forpartialslipboundary.
BC_Uw_g(bc) DP GasphaseU
w
forpartialslipboundary.
BC_Uw_s(bc,m) DP SolidsphaseU
w
forpartialslipboundary.
BC_Vw_g(bc) DP GasphaseV
w
forpartialslipboundary.
BC_Vw_s(bc,m) DP SolidsphaseV
w
forpartialslipboundary.
BC_Ww_g(bc) DP GasphaseW
w
forpartialslipboundary.
BC_Ww_s(bc,m) DP SolidsphaseW
w
forpartialslipboundary.
MFIX2013-2Readmefile
Page54of113
BC_JJ_PS(bc) I 1:UseJohnsonandJacksonpartialslipbc.0:Do
notuseJohnsonandJacksonpartialslipbc.
[0] Ifgranularenergytransportequationisnotsolved:
(GRANULAR_ENERGY=.FALSE.).
[1] Ifgranularenergytransportequationissolved:
(GRANULAR_ENERGY=.TRUE..
BC_JJ_M
[.FALSE.]
L UsethemodifiedJohnsonandJacksonpartialslip
BCwithvariablespecularitycoefficient.Mustset
e_wandphi_wwiththisBC.
GranularEnergy
Equation
Thegranularenergyboundaryconditionis
implementedasdT/dn+h
w
(T-T
w
)=c,wherenis
thenormalpointingfromthefluidintothewall.
IftheJohnsonandJacksonpartialslipboundary
conditionisnotused(i.e.,BC_JJ_PS(bc)=0),the
coefficientsh
w
andcshouldbespecified.
Forspecifiedheatfluxseth
w
=0andgiveavaluefor
c.Forspecifiedtemperatureboundarycondition
leaveh
w
unspecified(h
w
=andgiveavalueforT
w
.
BC_Thetaw_m(bc,m) DP T
w
forgranularenergybc.
BC_hw_Theta_m(bc,
m)
[]
DP H
w
forgranularenergybc.
BC_C_Theta_m(bc,m) DP cforgranularenergybc.
GasandSolids
EnergyEquations
Thethermalboundaryconditionimplementedas
dT/dn+h
w
(TT
w
)=c,wherenisthenormal
pointingfromthefluidintothewall.
Thecoefficientsh
w
,T
w
,andcshouldbespecified.
H
w
=0=>specifiedheatflux;h
w
==>specified
temperatureboundarycondition.Toseth
w
=,
leaveitunspecifiedandgiveavalueforTw.
BC_hw_T_g(bc)
[]
DP Gasphaseh
w
forheattransfer.
BC_hw_T_s(bc,m)
[]
DP Solidsphaseh
w
forheattransfer.
MFIX2013-2Readmefile
Page55of113
BC_Tw_g(bc) DP GasphaseT
w
forheattransfer.
BC_Tw_s(bc,m) DP SolidsphaseT
w
forheattransfer.
BC_C_T_g(bc) DP GasphaseCforheattransfer.
BC_C_T_s(bc,m) DP SolidsphaseCforheattransfer.
GasandSolids
SpeciesEquations
Thespeciesdiffusionboundaryconditionis
implementedasdX/dn+h
w
(X-X
w
)=c,wherenis
thenormalpointingfromthefluidintothewall.
Thecoefficientsh
w
,X
w
,andcshouldbespecified.
Hw=0=>specifiedspeciesdiffusionflux;h
w
==>
specifiedspeciesconcentrationattheboundary.To
seth
w
=,leaveitunspecifiedandgiveavaluefor
X
w
.
BC_hw_X_g(bc,n)
[]
DP Thespeciesdiffusionboundaryconditionis
implementedasdX/dn+h
w
(X-X
w
)=c,wherenis
thenormalpointingfromthefluidintothewall.
Thecoefficientsh
w
,X
w
,andcshouldbespecified.
H
w
=0=>specifiedspeciesdiffusionflux;h
w
==>
specifiedspeciesconcentrationattheboundary.To
seth
w
=,leaveitunspecifiedandgiveavaluefor
X
w
.
Gasphaseh
w
formasstransfer.
BC_hw_X_s(bc,m,n)
[]
DP Solidsphaseh
w
formasstransfer.
BC_Xw_g(bc,n) DP GasphaseX
w
formasstransfer.
BC_Xw_s(bc,m,n) DP SolidsphaseX
w
formasstransfer.
BC_C_X_g(bc,n) DP GasphaseCformasstransfer.
BC_C_X_s(bc,m,n) DP SolidsphaseCformasstransfer.
ScalarTransport
Equations
Thescalarboundaryconditionisimplementedas
dS/dn+h
w
(S-S
w
)=C,wherenisthenormal
pointingfromthefluidintothewall.
Thecoefficientsh
w
,S
w
,andcshouldbespecified.
Hw=0=>specifiedspeciesdiffusionflux;h
w
==>
specifiedspeciesconcentrationattheboundary.To
seth
w
=,leaveitunspecifiedandgiveavaluefor
S
w
.
MFIX2013-2Readmefile
Page56of113
BC_hw_Scalar(bc,n)
[]
DP h
w
forscalartransferattheboundary.
BC_ScalarW(bc,n) DP X
w
forscalartransferattheboundary.
BC_C_Scalar(bc,n) DP Cforscalartransferattheboundary.
SpecificationsforFLOWboundaryconditions:
Keyword(dimension) Type Description
BC_EP_g(bc) DP VoidfractionattheBCplane.
BC_P_g(bc) DP GaspressureattheBCplane.
BC_ROP_s(bc,m) DP BulkdensityofsolidsphaseattheBCplane.
BC_T_g(bc) DP GasphasetemperatureattheBCplane.
BC_T_s(bc,m) DP Solidsphase-mtemperatureattheBCplane.
BC_Theta_m(bc,m) DP Solidsphase-mgranulartemperatureattheBC
plane.
BC_X_g(bc,n)
[0]
DP MassfractionofgasspeciesnattheBCplane.
BC_X_s(bc,m,n)
[0]
DP Massfractionofsolidsphase-m,speciesnatthe
BCplane.
BC_U_g(bc) DP x-componentofgasvelocityattheBCplane.
BC_U_s(bc,m) DP x-componentofsolids-phasevelocityattheBC
plane.
BC_V_g(bc) DP y-componentofgasvelocityattheBCplane.
BC_V_s(bc,m) DP y-componentofsolids-phasevelocityattheBC
plane.
BC_W_g(bc) DP z-componentofgasvelocityattheBCplane.
BC_W_s(bc,m) DP z-componentofsolids-phasevelocityattheBC
plane.
Foramassinflowboundary,insteadofspecifyingthenormalvelocityataboundary,the
gasandsolidsflowratesmaybespecifiedasthevolumetricormassflowrates.Ifthe
MFIX2013-2Readmefile
Page57of113
volumetricormassflowrateisspecified,MFIXwillcalculatethevelocitynormaltothe
boundary.ThevelocitycalculatedbyMFIX,however,maydifferfromthevelocity
calculatedbasedonthephysicaldimensionsoftheportbecausethesimulated
dimensionsmaynotbeexactlyequaltothephysicaldimensions.Specifypositivevalues
foralltheflowrates.MFIXwillassignthecorrectsigntothecomputedvelocityvalues.
Ifthemassorvolumetricflowrateisspecifiedforamassoutflowboundarycondition,
thenateveryintervalBC_DT_0,MFIXwilladjustthenormalvelocitysothattheaverage
computed-outflowrateisequaltothespecifiedvalue.Theuseriscautioned,however,
thatifunrealisticmassflowratesarespecified,thecomputationsmaybecomeunstable.
Itisbettertospecifythevelocityatthemassoutflowboundary,ifsomeamountof
fluctuationinthemassoutflowrateistolerable.
Keyword(dimension) Type Description
BC_VOLFLOW_g(bc) DP Gasvolumetricflowratethroughtheboundary.
BC_VOLFLOW_s(bc,
m)
DP Solidsvolumetricflowratethroughtheboundary.
BC_MASSFLOW_g
(bc)
DP Gasmassflowratethroughtheboundary.
BC_MASSFLOW_s(bc,
m)
DP Solidsmassflowratethroughtheboundary.
MFIXallowsthespecificationofatransientjetwithitsvelocityfluctuatingbetweentwo
values.Thejetconditionswilloverridethesteadyconditionspecifiedforthenormal
velocity.Therefore,ifthereisnotransientjet,donotspecifyanyofthefollowing,except
BC_DT_0,whichmayberequiredformassoutflowconditions.
Keyword(dimension) Type Description
BC_DT_0(bc) DP Theintervalatthebeginningwhenthenormal
velocityattheboundaryisequaltoBC_Jet_g0.
Whenrestarting,runthisvalueandBC_Jet_g0
shouldbespecifiedsuchthatthetransientjet
continuescorrectly.MFIXdoesnotstorethejet
conditions.
ForMASS_OUTFLOWboundaryconditions,
BC_DT_0isthetimeperiodtoaverageandprintthe
outflowrates.Theadjustmentofvelocitiestogeta
specifiedmassorvolumetricflowrateisbasedon
theaverageoutflowrate.
MFIX2013-2Readmefile
Page58of113
BC_Jet_g0 DP Valueofnormalvelocityduringtheinitialinterval
BC_DT_0.
BC_DT_h(bc) DP Theintervalwhennormalvelocityisequalto
BC_Jet_gh.
BC_Jet_gh(bc) DP Valueofnormalvelocityduringtheinterval
BC_DT_h.
BC_DT_1(bc) DP Theintervalwhennormalvelocityisequalto
BC_Jet_g1.
BC_Jet_g1(bc) DP Valueofnormalvelocityduringtheinterval
BC_DT_1.
MFIX2013-2Readmefile
Page59of113
7.9. InternalSurfaces
Internalsurfaces(IS)arenormaltooneofthecoordinatedirectionsandcoincidewith
oneofthefacesofthescalarcontrolvolume.Oneofthethreepairsofcoordinatesis
equal.Thesurfaceisdefinedbytheconstantcoordinatesofeachofthefouredges,
whichcanbespecifiedwithphysicalcoordinatesorcellindices,andthetwoequal
valuesforthedirectionnormaltotheface,whichcanonlybespecifiedwithphysical
coordinates.Ifcellsizesarenotsmallenoughtoresolveasurfacespecifiedusing
physicalcoordinates,MFIXwillindicatethisproblemwithanerrormessage.
Tospecifyalargenumberofinternalsurfacesinaregion,a3Dregionmaybespecified.
WhenIS_Typeisspecifiedforsuchregions,addaprefix(X_,Y_,orZ_)toindicatethe
directionoftheinternalsurfaces;e.g.,X_IMPERMEABLEspecifiesimpermeable
internalsurfacesparalleltotheXcoordinate.
Internalsurfacesactasfree-slipwallsinstresscomputations.Thisdefaultcondition
cannotbechanged.
Keyword(dimension) Type Description
IS_X_w(is) DP xcoordinateofthewestfaceoredge.
IS_X_e(is) DP xcoordinateoftheeastfaceoredge.
IS_Y_s(is) DP ycoordinateofthesouthfaceoredge
IS_Y_n(is) DP ycoordinateofthenorthfaceoredge
IS_Z_b(is) DP zcoordinateofthebottomfaceoredge
IS_Z_t(is) DP zcoordinateofthetopfaceoredge
IS_I_w(is) I iindexofthewest-mostcell.
IS_I_e(is) I iindexoftheeast-mostcell
IS_J_s(is) I jindexofthesouth-mostcell
IS_J_n(is) I jindexofthenorth-mostcell
IS_K_b(is) I kindexofthebottom-mostcell
IS_K_t(is) I kindexofthetop-mostcell
IS_TYPE(is) C Typeofinternalsurface:
IMPERMEABLEorIP Nogasorsolidsflowthroughthesurface.
MFIX2013-2Readmefile
Page60of113
SEMIPERMEABLEor
SP
Gasflowsthroughthesurfacewithanadditional
resistance.Solidsvelocitythroughthesurfaceisset
tozeroortoauser-specifiedfixedvalue(i.e.,solids
momentumequationforthisdirectionisnotsolved)
IS_PC(is,2)
(*,1)=1.E32
(*,2)=0.0
DP 1:permeability;2:Inertialresistancecoefficient.
Thesevaluesneedtobespecifiedfor
semipermeablesurfacesonly.Thethicknessused
forpressuredropcomputationisthatofthe
momentumcell(DX_e,DY_n,orDZ_t).Toturnoff
theresistance,usealargevalueforpermeability
(1.E32)andasmallvaluefortheinertialresistance
coefficient(0.0).
IS_VEL_S(is,m)
[0.0]
DP Valueoffixedsolidsvelocitythroughsemipermeable
surfaces.
MFIX2013-2Readmefile
Page61of113
7.10. PointSourceMassInlets
Pointsources(PS)areusedinplaceofmassinletswhereeitherthegeometryand/or
gridresolutionprohibitproperboundaryconditionspecification.Forexample,apoint
sourcemaybeusedtomodelaninjectorwithdimensionssmallerthanthegrid.Point
sourcesmaybedefinedwithinasinglecomputationalcell,alongaplane,orasa
volumeofcomputationalcells.
[Undefined]
DP Ifavalueisdefined,say0.1s,anoverallspecies
massbalanceisperformedandreportedintheLOG
file.Theoverallmassbalancecalculationsmay
slightlyslowdowntherun.
MFIX2013-2Readmefile
Page65of113
7.12. ChemicalReactionsbasicoptions
Chemicalreactionsarespecifiedinthedatafile(mfix.dat)byprovidingspecies
aliasesandchemicalequations.Rateexpressionsarespecifiedinoneoftwouser
definedsubroutines,usr_rates.fandusr_rates_des.frespectively.Heatsof
reactionareautomaticallycalculated.Optionally,usersmayspecifyconstantheatsof
reactioninthedatafile.
Therearefivegeneralstepstoincorporatingchemicalreactionsintoasimulation:
1. Providespeciesnamesinthedatafile.
2. Assignauniqueidentifier(alias)toeachspeciesinthedatafile.
3. Definechemicalreactionparametersinthedatafile.
4. Definechemicalreactionratesinusr_rates.f and/orusr_rates_des.f.
5. Usemake_mfixto(re)buildtheMFiXexecutable.
1. Providespeciesnamesinthedatafilewiththefollowingkeywords.
Keyword(dimension) Type Description
NMAX_g
[UNDEFINED_I]
I
Numberofspeciescomprisingthegasphase
SPECIES_g(n)
[UNDEFINED_C]
C
Nameofgasphasespeciesnasitappearsinthe
materialsdatabase
NMAX_s(m)
[UNDEFINED_I]
I
Numberofspeciescomprisingsolidsphasem
SPECIES_s(m,n)
[UNDEFINED_C]
C
Nameofsolidsphasem,speciesnasitappears
inthematerialsdatabase
Forreactingdiscreteelementsimulations(DES),gasphasespeciesaredefinedusing
theabovekeywords(NMAX_g,Species_g).However,DESspecifickeywordsareused
Speciesnamesmustappearexactlyasgiveninthematerialsdatabase
(seeSection5.12,ThermochemicalProperties).Speciesnamesare
typically18characters,andforsomespecies,trailingspacesareneeded.
An overview of using legacy rrates.f files is given at the end of this
section. However, this input method is no longer directly supported.
MFIX2013-2Readmefile
Page66of113
toidentifythenumberofdiscretesolidsphasespeciesandmaterialdatabasenames.
Keyword(dimension) Type Description
DES_NMAX_s(m)
[UNDEFINED_I]
I
Numberofspeciescomprisingdiscretesolids
phasem
DES_SPECIES_s(m,n)
[UNDEFINED_C]
C
Nameofdiscretesolidsphasem,speciesnasit
appearsinthematerialsdatabase
2. Assignauniqueidentifier(alias)toeachspecieswiththefollowingkeyworks.
Keyword(dimension) Type Description
SPECIES_ALIAS_g(n)
[UNDEFINED_C]
C
Userdefinednameforgasphasespeciesn
SPECIES_ALIAS_s(m,n)
[UNDEFINED_C]
C
Userdefinednameforsolidsphasem,speciesn
DES_SPECIES_ALIAS_s
(m,n)
[UNDEFINED_C]
C
Userdefinednamefordiscretesolidsphasem,
speciesn
Aliasformattingrestrictions:
Aliasesmustbeunique.
Aliasesarelimitedto32charactersandmustfollowFORTRANvariablenaming
conventions(i.e.,alphanumericcombinationswithaletterasthefirstcharacter).
Aliasesarenotcasesensitive.
AliasescannotconflictwithexistingMFiXvariablenames(e.g.,aspeciesaliasof
MU_gwillcauseanerrorwhencompilingMFiX).
3. Definechemicalreactionsinthedatafileusingspeciesaliases.
Eachreactionisidentifiedbyareactionconstruct,andareactionblockisusedto
groupreactionconstructsinthedatafile.Areactionconstructhastheformat,
rxn_name{},whererxn_nameisauniqueidentifierforthereaction.Reaction
identifiersarelimitedto32charactersandmustfollowFORTRANvariablenaming
convention.
MFIX2013-2Readmefile
Page67of113
Therearetworeactionblocktypes:
@(RXNS)@(END)indicatescontinuumphasechemicalreactions(allTFM
gasandsolidsphasereactionsandDEShomogeneousgasphasereactions).
@(DES_RXNS)@(DES_END)indicatesheterogeneousDESchemical
reactions(particle/gas).
Thefollowingkeywordsareavailablewithinareactionconstruct.
Keyword(dimension) Type Description
CHEM_EQ
[UNDEFINED_C]
C
Chemicalequationforthereactionconstructed
fromspeciesaliases.
Ex:Charcombustion
CHEM_EQ = C + 0.5O2 --> CO
DH(
Optional)
[UNDEFINED]
DP
Userprovidedheatofreaction
(cal/moleforCGSandJ/kmoleforSI).
fracDH(m)(
Optional)
[ZERO]
DP
ThefractionalamountofDHsuppliedtophasem.
* AchemicalreactionequationofNONEdeactivatesthereactionduringa
simulation(e.g.,CHEM_EQ = NONE).
Bydefault,heatsofreactionareautomaticallycalculatedandassignedtothe
appropriatephase(s).However,usersmayspecifyaconstantheatofreaction,
Adatafilecanonlycontainonereactionblockofeachtype,whereasa
reactionblockmustcontainoneormorereactionconstructs.
MFiXprocesseschemicalreactiondatadifferentlythanotherinputinthe
datafile.Areactionblockindicatesthestartandendofthereactioninput.
Areactionconstructgroupsasinglereactionsinputparameters.
@(RXNS)
rxn1 {
<input parameters>
}
rxn2 {
<input parameters>
}
@(END)
reaction
construct
reaction
block
reaction
construct
reaction
identifiers
mfix.datreactioninput
MFIX2013-2Readmefile
Page68of113
DH,foroneormorereactionstooverrideautomatedcalculations.IfDHisgiven,
thenfracDHisrequired.Theassignedfractionalproportionsmustsumtoone
overallphases.
Reactionconstructformattingnotes:
Chemicalreactionsarealwaysspecifiedasirreversiblewithreactantsontheleft
andproductsontheright.(CHEM_EQ = Reactants --> Products)
Anarroworequalssigncanbeusedtodistinguishreactantsfromproducts.
(Reactants --> ProductsorReactants = Products)
Reversiblereactionsarespecifiedastwoirreversiblereactions.
(seebelowexample,Athermal,gasphase,reversiblereaction)
Chemicalequationsmayspanseverallinesbyincludinganampersand(&)atthe
endoftheline.Astheexamplebelowillustrates,eachlineofthechemical
equationisboundinquotationmarksandtheampersandislocatedtotherightof
thesecondquotationmark.
hiddentext
Chemicalequationsarelimitedto512characters.
Chemicalequationscanbeboundwithinsingleordoublequotes.
(CHEM_EQ = Reactants = Productsor Reactants = Products)
Catalyticreactionsshouldcontainaspeciesfromthecatalystphaseinthe
chemicalequationwithacoefficientofzero.Thisinsurestheproperassignment
oftheheatofreaction.
(CHEM_EQ = A + 0.Cat -->3.0*RwhereCatisacatalystphasespecies)
Catalystphasespeciescanbelistedasaproduct,reactant,orboth.
Severalexamplesillustratingthedatafileinputforseveralreactionsareprovidedbelow.
Commentsareprecededwithanexclamationmake(!).
Example:MethaneCombustion:CH
4
() +2O
2
CO
2
() +2H
2
O()
Notes:Heatofreactionisautomaticallycalculated(default).
@(RXNS) ! Begin reaction block
CH4_Combustion { ! Reaction 1 construct
chem_eq = CH4 + 2O2 --> & ! Chemical Reaction Line 1
CO2 + 2H2O ! Chemical Reaction Line 2
} ! End reaction 1 construct
@(END) ! End reaction block
MFIX2013-2Readmefile
Page69of113
Example:Athermal,gasphase,reversiblereaction:A() R()
Notes:Speciesdatabasenamesandaliasesaredefinedonsinglelines.
Theforwardandbackwardreactionsaredefinedseparately.
Theheatsofreactionaredefinedaszero(athermal)andexplicitlyassigned
tothegasphase.
NMAX_g = 2 ! No. gas phase species
Species_g(1) = O2 CO ! Database names
Species_Alias_g(1) = O2 CO ! Species aliases
NMAX_s(1) = 2 ! No. solids phase species
Species_s(1,1) = C(GR) REF ELEMENT ! Fixed Carbon (graphite)
Species_s(1,2) = Coal Ash ! Coal Ash
Species_Alias_s(1,1) = C Ash ! Fixed Carbon and Coal Ash
@(RXNS) ! Begin reaction block
Char_Combustion { ! Reaction 1 construct
chem_eq = C + 0.5O2 --> CO ! Chemical Reaction Eq
DH = -52834.0 ! (cal/moles-reacted)
fracDH(0) = 0.2 ! HoR assigned to gas phase
fracDH(1) = 0.8 ! HoR assigned to s. phase 1
} ! End reaction 1 construct
@(END) ! End reaction block
MFIX2013-2Readmefile
Page71of113
ExampleCompoundDEMreaction:
COcombustion: CO() +0.5O
2
() CO
2
()
CO2gasification: C() +CO
2
() 2CO()
Charcombustion: C() +0.5O
2
() CO()
Notes:Gasphasespeciesnamesandaliasesaredefinedonthesameline.
DESspecifickeywordsareusedtodefinedDESspeciesdata.
Heatsofreactionforallreactionsarecalculatedautomatically.
ATFMreactionblockisusedforthegasphasehomogeneousreaction.
ADEMreactionblockisusedforgas/solidsreactions.
Reactionconstructsaregiveninoneline.
Additionalcomments:
Coal Ashisnotaspeciesincludedinthethermochemicaldatabaseand
wouldrequirethatthepropertiesbegiveninthedatafile(seeSection5.12
Thermochemicalproperties).
One-linereactionconstructsareonlypossiblewhentheheatofreactionis
automaticallycalculated(i.e.,thechemicalequationistheonlyinput
parameter).
! Gas phase species data
NMAX_g = 3
Species_g(1) = O2 Species_Alias_g(1) = O2
Species_g(2) = CO Species_Alias_g(2) = CO
Species_g(3) = CO2 Species_Alias_g(3) = CO2
! DES solids phase species data
DES_NMAX_s(1) = 2
DES_Species_s(1,1) = C(GR) REF ELEMENT
DES_Species_s(1,2) = Coal Ash
DES_Species_Alias_s(1,1) = C
DES_Species_Alias_s(1,2) = Ash
! Homogeneous gas phase reactions
@(RXNS)
CO_Combustion { chem_eq = CO + 0.5O2 --> CO2 }
@(END)
! DES Reaction block
@(DES_RXNS)
CO2_Gasification { chem_eq = 2.0C + O2 --> 2CO }
Char_Combustion { chem_eq = C + CO2 --> 2CO }
@(DES_END)
MFIX2013-2Readmefile
Page72of113
4. DefinechemicalreactionratesinUDFfiles(usr_rates.fandusr_rates.f).
Areactionrateshouldbegivenineitherusr_rates.forusr_rates_des.ffor
eachreactionlistedinthedatafile.
AllTFMgasandsolidsphasereactionsaswellashomogeneousgasphase
reactionsforDEMsimulationsaretobeincludedinusr_rates.f.Reaction
ratesdefinedinusr_rates.fmusthaveunitsofreactedmolespertimeper
volume(i.e.,moles/sec/cm
3
forCGSunitsandkmoles/sec/m
3
forSIunits).
Alldiscretephaseheterogeneous(particle/gas)reactionsaretobeincludedin
usr_rates_des.flocatedinthedessubfolder.Reactionratesdefinedin
usr_rates_des.fmusthaveunitsofreactedmolespertime(i.e.,
moles/sec).
Therateintermsofreactedmolesisrelatedtotheratesofformationand
consumptionthroughthestoichiometriccoefficients.Forexample,consider
homogeneousgasphasereactionofmethanecombustion:
CH
4
+2O
2
CO
2
+2H
2
O.
Therateintermsofreactedmoles,Rate,isrelatedtotheratesofformationand
consumptionas
=
4
1
CH
4
/(
3
)
CH
4
=
2
2
O
2
/(
3
)
O
2
=
CO
2
1
CO
2
/(
3
)
CO
2
=
H
2
O
2
H
2
/(
3
)
H
2
O
,
where
4
and
2
aretheratesofconsumptionofmethaneandoxygen,and
2
and
aretheratesofformationofcarbondioxideandwatervapor,
respectively.
EachreactionrateisassignedtothevariableRATES(rxn_name),where
rxn_nameisthereactionidentifierusedinthereactionconstruct.Tominimizeinput
errorswhenspecifyingreactionrates,speciesaliases(SPECIES_ALIAS)definedin
thedatafileshouldbeusedinlieuoftheassociatedspeciesindex.
Forexample,ifoxygenisdefinedasgasphasespecies2withanaliasofO2,(e.g.,
SPECIES_ALIAS_g(2)=O2)),whenaccessinggasphasespeciesdatafor
Formation and consumption rates are automatically calculated for each
species from the reaction rate and chemical equation.
MFIX2013-2Readmefile
Page73of113
oxygen(e.g.,molecularweight;MW_g),O2shouldbeusedandnottheinteger
index2,(e.g,MW_g(O2)).
AsimilarprocedureisusedforDESreactionswiththeexceptionthatthereaction
rateisassignedtothevariableDES_RATES(rxn_name),whererxn_nameisthe
reactionidentifierusedinthereactionconstruct.
Example:MethaneCombustion:CH
4
() +2O
2
CO
2
() +2H
2
O()
Notes:Speciesdatabasenamesandaliasaredefinedonthesameline.
Thefluidcellindex(IJK)ispassedasadummyargument.
Globalfieldvariablesarereferenced(RO_g,X_g,T_g,andEP_g)
Speciesaliases(O2andCH4)areusedinsteadofthespeciesindices.
Reactionidentifier(CH4_Combustion)isusedintheratesarray.
Reactionrateisstoredforpostprocessing(seebelow).
data file input:
usr_rates.f input:
NMAX_g = 4
Species_g(1) = CH4 ANHARMONIC Species_Alias_g(1) = CH4
Species_g(2) = O2 Species_Alias_g(2) = O2
Species_g(3) = CO2 Species_Alias_g(3) = CO2
Species_g(4) = H2O Species_Alias_g(4) = H2O
@(RXNS)
CH4_Combustion { chem_eq = CH4 + 2O2 --> CO2 + 2H2O }
@(END)
MFIX2013-2Readmefile
Page74of113
SUBROUTINE USR_RATES(IJK, RATES)
DOUBLE PRECISION, INTENT(IN) :: IJK ! Fluid Cell Index
DOUBLE PRECISION, INTENT(OUT) :: RATES(:) ! Reaction Rates
DOUBLE PRECISION c_02 ! Oxygen concentration (mol/cm^3)
DOUBLE PRECISION c_CH4 ! Methane concentration (mol/cm^3)
! Calculate species concentrations:
c_O2 = (RO_g(IJK) * X_g(IJK,O2))/MW_g(O2)
c_CH4 = (RO_g(IJK) * X_g(IJK,CH4))/MW_g(CH4)
! Methane Combustion
! CH4 + 2O2 --> CO2 + 2H2O (reacted moles/sec.cm^3)
!-----------------------------------------------------------------//
RATES(CH4_Combustion) = 6.7d12 * exp(-2.4358d4/T_g(IJK)) * &
EP_g(IJK) * (c_O2**1.3) * (c_CH4**0.2)
! Store the reaction rate for output/post processing.
IF(CH4_Combustion <= NRR) &
ReactionRates(IJK, CH4_Combustion) = RATES(CH4_Combustion)
END SUBROUTINE USR_RATES
MFIX2013-2Readmefile
Page75of113
Example:Athermal,gasphase,reversiblereaction:A() R()
Notes:Speciesdatabasenamesandaliasaredefinedonthesameline.
Thefluidcellindex(IJK)ispassedasadummyargument.
Globalfieldvariablesarereferenced(RO_g,X_g,T_g,andEP_g)
data file input:
usr_rates.f input:
Example-Charcombustion:C() +0.5O
2
() CO()
Notes:Arepresentativedatafileinputwaspresentedpreviously.
Thefluidcellindex(IJK)ispassedasadummyargument.
Algebraicexpressionsfortheratelimitingstepsareomittedforbrevity.
Seemfix/model/tutorial/SpoutedBedCombustorfordetailsonasimilar
simulationsetup.
SUBROUTINE USR_RATES(IJK, RATES)
DOUBLE PRECISION, INTENT(IN) :: IJK ! Fluid Cell Index
DOUBLE PRECISION, INTENT(OUT) :: RATES(:) ! Reaction Rates
! Rate limiting steps:
DOUBLE PRECISION k_f ! film diffusion (cm/sec)
DOUBLE PRECISION k_a ! ash layer diffusions (cm/sec)
DOUBLE PRECISION k_s ! chemical kinetics (cm/sec)
DOUBLE PRECISION k_eff ! effective rate (cm/sec)
! Total surface area of solids phase 1 in IJK
DOUBLE PRECISION Sa ! (cm^2/cm^3)
! C + 0.5O2 --> CO (reacted moles/sec.cm^3)
!-------------------------------------------------------//
! Verify that solids are present
IF(.NOT.COMPARE(EP_g(IJK),ONE)) THEN
! Calculate film diffusion rate
k_f = < film diffusion rate expression > ! (cm/sec)
! Calculate ash diffusion rate
k_a = < ash diffusion rate expression > ! (cm/sec)
! Calculate kinetic rate rate
k_s = < kinetic rate expression > ! (cm/sec)
! Effective rate (cm/sec)
k_eff = ONE/(ONE/k_a + ONE/k_f + ONE/k_s)
! Calculate total surface area of solids phase 1
Sa = 6.0 * EP_s(IJK,1) / D_p0(1)
! Calculate the reaction rate.
RATES(Char_Combustion) = 2.0 *(Sa * k_eff * Conc(O2))
ELSE
! No solids --> No reaction
RATES(Char_Combustion) = ZERO
ENDIF
END SUBROUTINE USR_RATES
MFIX2013-2Readmefile
Page77of113
ExampleDESdropletevaporation:H
2
O(l) H
2
O(g)
Notes:VariousalgebraicexpressionsinthesampleUDFareomittedforbrevity.
Theglobalparticleindex(NP),phaseindex(pM),andfluidcellindex(IJK)
arepassedasdummyarguments.
data file input:
usr_rates_des.f input:
Seemfix/tests/dem-tests/evaporationforadditionaldetails.
SUBROUTINE USR_RATES_DES(NP, pM, IJK, DES_RATES)
DOUBLE PRECISION, INTENT(IN) :: NP ! Global particle index
DOUBLE PRECISION, INTENT(IN) :: pM ! Particle solid phase
DOUBLE PRECISION, INTENT(IN) :: IJK ! Fluid Cell Index
DOUBLE PRECISION, INTENT(OUT) :: DES_RATES(:) ! Reaction Rates
! Liquid --> Vapor (reacted moles/sec)
!-------------------------------------------------------//
! Calculate the concentration gradient (mole/cm^3)
Cmg_H2O = < expression for calculating gradient >
IF(Cmg_H2O > ZERO) THEN
! Calculate mass transfer coefficient (cm/sec)
H2O_xfr = < mass transfer coeff calculation >
! Calculate droplet surface area (cm^3)
Sa = Pi * 4.0d0 * (DES_RADIUS(NP)**2)
! Calculate the mass transfer rate (moles/sec)
DES_RATES(Evap) = Sa * H2O_xfr * Cmg_H2O
ELSE
DES_RATES(Evap) = ZERO
ENDIF
! Store the reaction rate for post processing.
IF(Evap <= NRR) ReactionRates(Evap) = &
ReactionRates(IJK, Evap) + DES_RATES(Evap)
END SUBROUTINE USR_RATES_DES
NMAX_g = 2 ! No. of gas phase species
Species_g(1) = Air H2O ! Database names
Species_Alias_g(1) = Air Vapor ! Species Aliases
DES_NMAX_s(1) = 1 ! No. of DEM solids phase species
DES_Species_s(1,1) = H2O(L) ! Database names
DES_Species_Alias_s(1,1) = Liquid ! Species Aliases
@(DES_RXNS)
Evap { Liquid --> Vapor }
@(DES_END)
MFIX2013-2Readmefile
Page78of113
5. Usemake_mfixto(re)buildtheMFiXexecutable.
DetailedinstructionsonbuildingtheMFiXexecutablearegiveninSection2.3.1.
make_mfixshouldberantoupdatethemfix.exeexecutableifanyoneofthe
followingmodificationsismade:
thenumber,order,oraliasofanyspeciesischangedinthedatafile.
thenumber,order,ornameofanychemicalreactionischangedinthedatafile.
anychangeismadetochemicalreactionratesineitherusr_rates.for
usr_rates_des.f.
Additionalreactioninformation::
TowriteoutreactionratestoSPxfile:
1. Inthedatafile,mfix.dat,setNRRtothedesirednumberofreactionratesto
bewrittenouttothefile*.SPA.Thisnumberistypicallylessthanorequalto
thetotalnumberofreactions.
2. InareactionUDF(usr_rates.forusr_rates_des.f)assignthe
desiredreactioninformationtothevariableReactionRates.
ReactionRatesisatwo-dimensionalarray.Thefirstindexreferencesthe
fluidcell,IJK,whilethesecondindexrangesfrom1toNRR.
TwooftheaboveexamplesillustrateusingtheReactionRatesvariable:
1. MethaneCombustion:Thecalculatedreactionrateisdirectlystored,and
logicalcheckisusedtopreventoverindexingtheReactionRatesarray.
2. DESdropletevaporation:Thecalculatedreactionrateisaddedtothestorage
array.AddingthecalculateddatatothestoragevariableisneededinDES
sinceseveraldiscreteparticlesmayexistinasinglefluidcell.Again,alogical
checkispreformedtopreventoverindexingthearray.
IfthesecondindexexceedsNRR,aruntimeerrorcanresultfromover
indexingthearray.Usinglogicalcheckscaneliminatepotentialerrors!
make_mfix preprocesses the data file to generated the species.inc
file which is included within the user_rates.f and usr_rates_des.f
files as code. Therefore changes in the data file may result in the
executable being out of date.
MFIX2013-2Readmefile
Page79of113
Usinganexisting(legacy)rrates.ffile:
Thelegacyrrates.ffileshouldbecopiedtotherundirectory.Additionally,the
followingkeywordsshouldbespecifiedinthedatafile:
Keyword(dimension) Type Description
USE_RRATES
[.FALSE]
L
UsetheautomatedreactionrateUDFS;
usr_rates.fandusr_rates_des.f.
.TRUE.
Accesslegacyrrates.ffileforreactionrate
information.Ratesofformation/consumptionas
wellasheatsofreactionareprovidedbythe
user.
NMAX(m)
[UNDEFINED_I]
I
Numberofspeciesinphasem.Notethatthegas
phaseisindicatedasm=0.
SPECIES_NAME(n)
[UNDEFINED_C]
C
Namesofgasandsolidsphasespeciesasit
appearsinthematerialsdatabase.Thefirst
NMAX(0)arethenamesofgasspecies.Thenext
NMAX(1)arethenamesofsolidsphase-1
species,etc.
Additionalremarks:
make_mfixrequiresthatthedatafile,mfix.dat,bepresentintherundirectory
asthespeciesaliasesandreactionidentifiersareneededtoconstructa
species.incfile.
Speciesaliasesandreactionidentifiersmustbeunique.make_mfixperformsa
cursorycheckonthesupplieddataandexitsifnonuniqueentriesareidentified.
Ifanyspeciesaliasorreactionidentifierconflictswithanexistingglobalvariable
inMFiX,anerrorwillbereportedandthecodewillfailtocompile.
The only modification needed for a legacy mfix.dat and rrates.f file
combination is the inclusion of USE_RRATS=.TRUE. in the data file.
An example of legacy file usage: mfix/tutorials/reactor1b
Legacyspecieskeywords,NMAX(m)andSPECIES_NAME(n),are
requiredwhenusingalegacyrrates.ffile.Currentspecieskeywords
NMAX_g,NMAX_s,SPECIES_g,andSPECIES_scannotbeused.
MFIX2013-2Readmefile
Page80of113
7.13. Chemicalreactionsadvancedoptions
StiffChemistrySolver(Fractional-StepMethod)
AstiffchemistrysolverhasbeenfullyintegratedintoMFIX.Thisapproachfirstsolves
theconvection/diffusionequationswithoutchemicalreactionsourceterms.Acoupled
setofODEsisthendirectlyintegratedtoimposechemicalreactionseffects.This
approachmaydecreasesimulationtimebypermittinglargertimestepswithinthe
convection/diffusionmodel.However,thestiffchemistrysolvermayincreasesimulation
time,especiallyifreactionsarenotstiff.
Thestiffchemistrysolverisinvokedbyspecifyingthefollowingkeyword:
Keyword(dimension) Type Description
STIFF_CHEMISTRY
[.FALSE.]
L Runtimelogicaltoinvokestiffchemistrysolver.
Reactionsarespecifiedusingthesameapproachedoutlinedinthechemicalreactions
section,namely:
1. Providespeciesnamesinthedatafile.
2. Assignauniqueidentifier(alias)toeachspeciesinthedatafile.
3. Definechemicalreactionparametersinthedatafile.
4. Definechemicalreactionratesinusr_rates.f
5. Usemake_mfixto(re)buildtheMFiXexecutable.
Additionalremarks:
VariablesgoverningODEconvergencecriteriaarespecifiedasparametersin
stiff_chem_mod.ffoundinthemodel/chemdirectory.Additionalinformation
ontheseparametersandthereusageisavailableinmodel/ODEPACK.F.
ThestiffchemistrysolverisnotavailablewithaDESsimulations.
Thestiffchemistrysolverdoesnotsupportlegacyrrates.ffiles
MFIX2013-2Readmefile
Page81of113
Itisrecommendtofirstrunyoursimulationindebugmode.Thiswillcatchsome
commonprogrammaticerrorsintheusr_rates.ffile.Additionally,thestiff
chemistrysolverchecksforNaNscalculatedintheusr_rates.ffile.
Thetutoriallocatedinmfix/tutorials/silane_pyrolysisshowshowtousethestiff
chemistrysolver.
ISATandDirectIntegrationforChemicalReactions
MFIXnolongersupportsimplementingreactivechemistryviaISAT(InSituAdaptive
Tabulation).Thefollowingkeywordsaredisabledandresultinruntimeerrorswhen
included:
Keyword(dimension) Type Description
CALL_DI L DISABLED
Variabletodecideifchemicalreactionsaretime-
splitandsolvedusingdirectintegration(DI)with
ODEsolver.
CALL_ISAT L DISABLED
Variabletodecideifchemicalreactionsaretime-
splitandsolvedusingISAT.
CALL_GROW L DISABLED
Variabletodecideifparticlegrowthduetochemical
reactionsiscalculated.
ISATdt DP DISABLED
TimestepforISATsimulations.
MFIX2013-2Readmefile
Page82of113
7.14. ThermochemicalProperties
Thedirectorymfix/model/thermochemicalcontainsthedatabaseofBurcatand
Ruscic(2005)androutinesforreadingthedatabase.Withlinkagetothisdatabasethe
usersneednotmanuallyenterdataformolecularweight,specificheat,andheatsof
reactions.Insteadtheusersneedtoenterthenamesofthespecies(keyword
SPECIES_gandSPECIES_s)inthedatafile.MFIXreadsthenecessarythermo-
chemicaldatafromfilesinthefollowingorder:
1.mfix.dat
2.BURCAT.THRfileintherundirectory
3.mfix/model/thermochemical/BURCAT.THR.
ThespeciesnamesarecasesensitiveandshouldmatchthenamesinBURCAT.THR
exactly;alternativelyaliasescanbedefinedforcommonspecies,suchasO2,in
read_therm.f.Seemfix/tests/thermoforasamplecasethataccessesthe
database.TheformatofBURCAT.THRfileresemblesCHEMKINformat,butwithseveral
notabledifferences.Thermochemicaldatamuststartbelowalinethatstartswith
THERMO DATA.
ExampledatasetfromBURCAT.THRwithnotations:
EachentryinthedatabasestartswithauniqueCASidentifier(74-82-8)forthe
species,followedbyseverallinesofcommentshighlightedingreen.Thedatasection
startswiththespeciesnameincolumns1-18(CH4 RRHO).Commonspeciesnames
maybefollowedbystrings(RRHO)thatidentifythemethodusedtodeterminethe
coefficients.Additionalinformationfollowsthespeciesname.Thenumberstowardthe
endofthelinearethetemperaturelimits(200.000 6000.000)indegreesKelvin
wherethepropertycalculationisvalidandthemolecularweight(16.04246).Unlike
CHEMKINthecommontemperatureforthehighandlowtemperaturebranchesarenot
recorded;itisalways1000K.Thenextthreelinesgivethefourteencoefficients(seven
1.91178600E+00 9.60267960E-03 -3.38387841E-06 5.38797240E-10 -3.19306807E-14
-1.00992136E+04 8.48241861E+00 5.14825732E+00 -1.37002410E-02 4.93749414E-05
-4.91952339E-08 1.70097299E-11 -1.02453222E+04 -4.63322726E+00 -8.97226656E+03
CH4 RRHO g 8/99C 1.H 4. 0. 0.G 200.000 6000.000 B 16.04246 1
than the NRRAO2. Max Lst Sq Error Cp @ 6000. K 0.62%.
3
4
CH4 METHANE Same as the Anharmonic but calculated Using the RRHO method rather
74-82-8
2
CAS
identifier
valid
temperature
range
molecular
weight
comments
formation
enthalpy at
298K
species
name
high
temperature
coefficients
low
temperature
coefficients
MFIX2013-2Readmefile
Page83of113
coefficientseachforthehighandlowtemperaturebranches)andtheformationenthalpy
at298K(whichisalsonotincludedinCHEMKINformat).Allthecoefficientsandthe
enthalpyofformationarenormalizedwiththegasconstantR(cal/mol/K).Thelow
temperaturecoefficients(
)shouldbeusedfortemperaturesintherangeT
low
to1000K
andthehightemperaturecoefficients(
)shouldbeusedfortemperaturesintherange
1000KtoT
high
.Thecoefficientsarestoredinafixedformat(E15.0)asfollows:
where
istheformationenthalpyat298K.
Thenormalizedspecificheatisgivenby
/ =
1
+
2
+
3
2
+
4
3
+
5
4
.
Additionaldatabasecomments:
Anumberofspeciesinthedatabasehavealowertemperaturelimitof300K
whichis2degreesabovethereferencetemperature(298K)usedforformation
enthalpycalculation.ForthosespeciesMFIXrelaxesthelowerlimitforCp
calculationsto298Ktoenableheatofreactioncalculation.
seeread_database.f
Thedatabasereaderissetupsuchthatthedatabaseisreadonlyifnecessary.
ForadditionaldetailsseetheBurcatandRuscic(2005)reportlocatedinthe
thermo-chemicalsubdirectory,mfix/model/thermochemical/intro.pdf.
Ifyouincludethermochemicalpropertiesinmfix.dat,allkeywordsdefined
belowthelinethatstartswithTHERMODATAwillbeignored.
4
MFIX2013-2Readmefile
Page84of113
7.15. User-DefinedSubroutines
Theusermaymodifyany*.for*.incfileinMFIX.Tomodifyafile,firstcopyitfromthe
mfix/modeldirectoryintotherundirectory.Modifyonlythiscopyintherundirectory;do
NOTmodifytheoriginalfilesinmfix/model.Then,invokethe'shmake_mfix'command
fromtherundirectory.Themake_mfixmessageswillidentifythefilesfromtherun
directoryusedtocreatetheMFIXexecutable.Allthe(MFIXandnon-MFIX)*.incfiles
fromtherundirectorywillbeusedtocreatetheMFIXexecutable.OnlyMFIX*.ffiles
fromtherundirectorywillbeused,however.Non-MFIX*.ffilesintherundirectorywill
beignored.TousenewFortranfiles,includetheminoneoftheMFIX*.ffiles.
ThefollowingisalistofMFIXfilesthatareusuallymodifiedtoincludechemical
reactionsanduserdefinedscalars:
usr_rates.f Chemicalreactionrates.
transport_prop.f Transportproperties.
physical_prop.f Physicalproperties.
scalar_prop.f Propertiesandsourcetermsinscalartransport
equations.
usr_rates_des.f
[1]
DESchemicalreactionrates.
Thefollowingroutinesareusedforwritinguser-definedoutput:
write_usr0.f Calledonceduringtherun.Canbeusedforopening
user-definedfiles.
write_usr1.f CalledatintervalsdefinedbyUSR_DT.
Toactivatethecallstothefollowingthreeroutines,setcall_usr=.TRUE.inthedatafile:
usr0.f Asubroutinethatiscalledonceeveryrun,justbefore
thetime-loopbegins.
usr1.f Asubroutinethatiscalledonceeverytimestep.
usr2.f Asubroutinethatiscalledonceeveryiteration.
usr3.f Asubroutinethatiscalledonceeveryrun,afterthe
time-loopends.
usrnlst.inc Listofuser-definedkeywords.Thesemaybeusedto
enterdatathroughtheinputdatafilemfix.dat.
MFIX2013-2Readmefile
Page85of113
usr_init_namelist.f Initializeuser-definedkeywords.
usr_mod.f User-definedmodule.Include"Useusr"touseuser-
definedvariablesinthismodule.Ifallocatablearrays
aredefinedinthismodule,allocatetheminusr0.f.
usr0_des.f
[1]
AsubroutinecalledbeforeenteringtheDEStimeloop.
usr1_des.f
[1]
AsubroutinecalledeveryDEMtimestepafter
calculatingDESsourcetermsbutbeforesourceterms
areappliedtotheparticles.
usr2_des.f
[1]
AsubroutinecalledeveryDEStimestepaftersource
termsareappliedtotheparticles.
usr3_des.f
[1]
AsubroutinethatiscalledaftercompletingtheDES
timeloop.
usr4_des.f
[1]
ThissubroutineiscalledfromandIJKloopbefore
calculatingDEMreactionrates.Usedforcalculating
valuesthatareconstantwithinafluidcellneededfor
reactioncalculations(e.g.,SchmidtNumber).
[1]
DenotesfilescontainedintheDESsubfolder(mfix/model/des/).
MFIX2013-2Readmefile
Page86of113
DES User-defined subroutine call structure:
calculate DES
hydrodynamic and
energy source terms
call to
user1_des.f
update DES
variables
call to
user2_des.f
reacting
flow
calculate DES
reaction source terms
Loop over
fluid cells (IJK)
call to
user4_des.f
loop over particles
in fluid cell IJK
call to
user_rates_des.f
no
yes
DES Time Loop
Pass off from
continuum phase
model
call to
user0_des.f
Pass off to
continuum phase
model
call to
user3_des.f
MFIX2013-2Readmefile
Page87of113
7.16. ParallelizationControls
Keyword(dimension) Type Description
NODESI
[1]
I Numberofgridblocksinx-direction.
NODESJ
[1]
I Numberofgridblocksiny-direction.
NODESK
[1]
I Numberofgridblocksinz-direction.
MINIMIZE_DOTPROD
UCTS
[.FALSE.]
L ThedotproductscalculationsinBiCGStabare
minimizedandthisshouldonlyhaveimpacton
parallelruns
SOLVER_STATISTICS
[.FALSE.]
L Printoutadditionalstatisticsforparallelruns
DEBUG_RESID
[.TRUE.]
L Ifsettofalse,theresidualsaregroupedintofar
fewerglobalcollectivesandthisshouldonlyhave
impactonparallelruns
NODESI*NODESJ*NODESKmustbethesameasthenumberofprocessors
specifiedusingthempirun(orequivalentcommand).Otherwisethecodewillreturnwith
anerror.
Theparallelperformancedependsonseveralthingsandonehastoevaluatedifferent
optionsbeforechoosingtherightstrategyfortheproblemathand.Fore.g.iftheJ
directionisthestrongestcoupleddirection,thepreconditioningforthelinearsolverwill
bepoorifthereisdecompositioninthatdirection.However,sincedecomposinginall
thedirectionsreducestheprocessorgridsurfaceareatothevolume,the
communicationcostwillbelessforthesamecomputationalgrid.Thepreconditioners
arechosenwiththekeywordLEQ_PC.InadditiontoLINErelaxation,onecanchoose
theDIAGorNONEpreconditionersthatreducesinterprocessorcommunicationsbut
wouldincreasethenumberoflinearequationsolveriterations.TheDIAGandNONE
choicesforpreconditionersmaybeappropriateforallequationsexceptthecontinuity(or
pressureandvolumefractioncorrection)equations.Theparallelperformanceisgreatly
dependentonthechoicesstatedhere,andsometrialanerrormayberequiredto
determinetherightcombinationofdecompositiondirectionandthechoiceof
preconditionerstogetthebestperformanceinproductionruns.
MFIX2013-2Readmefile
Page88of113
7.17. MFIXExecutioninBatchQueueEnvironment
MFIXcanbeusedonsystemswherecodeexecutioniscontrolledthroughbatchqueue
submissionsysteminsteadofinteractiveorbackgroundjobtypemethodsshowninthe
previoussection.Usuallytheuserspecifiesthewallclocktimedurationofthejoband
batchqueuingsystemprioritizeincomingjobsbasedontheirresourceallocation
requests.InorderforMFIXtoterminatecleanlyattheendofthebatchjobsession,
severalkeywordsneedtobeenteredinmfix.dat.Cleanterminationinenvironments
withbatchqueueisimportantasthesystemmayterminatethebatchjobwhileMFIXis
writingout*.SPfiles,whichmaycorruptthefilesorcauselossofdata.
Forthispurpose,MFIXchecksifterminationcriteriaspecifiedbyuserisreachedornot
atthebeginningofeachtimestep.However,toavoidperformancebottlenecksonsmall
systemswheretheuserisrunningtheirjobswithoutabatchqueue,thisfeatureis
disabledbydefault.Inordertoenablethisfeaturethefollowingblockofcommands
needtobeenteredinmfix.dat.
SettingCHK_BATCH_END = .TRUE.inmfix.datwillenablethecheckingofthe
terminationcriteriaatthebeginningofeachtimestep.Intheaboveexample,theuser
hassetthetotalwallclocktimeforthedurationofthebatchsessionto1hour(thisis
specifiedinsecondsinmfix.dat)andabufferof300secondshasbeensetsothatMFIX
hassufficienttimetoterminatecleanlybywritingoutall*.SPand*.RESfilesbeforethe
batchsessionterminates.Thedurationofthebufferiscriticalforsimulationswithlarge
files.MFIXwillcheckifelapsed time >= (BATCH_WALLCLOCK TERM_BUFFER)
tostartcleantermination.
AnotherwaytogracefullyterminateMFIXassoonaspossibleistocreateanemptyfile
namedMFIX.STOP(filenamealluppercase)intheworkingdirectorywhereMFIXruns.
AtthebeginningofeachtimestepifMFIX.STOPfileisdetectedtoexist,thenMFIXwill
terminategracefullybysavingall*.SPand*.RES files.CHK_BATCHQ_ENDflag
mustbesetto.TRUE.inordertoactivatethisfeature.
OnLinuxplatforms,thefollowingcommandcouldbeusedtogeneratethegraceful
terminationtrigger:
touch MFIX.STOP
CHK_BATCHQ_END = .TRUE. ! Enable the clean termination feature
BATCH_WALLCLOCK = 3600.0 ! Specify the total wall clock duration
! of your job in seconds
TERM_BUFFER = 300.0 ! Specify a buffer time to start
! clean termination of MFIX
MFIX2013-2Readmefile
Page89of113
DONOTforgettoerasethefileonceMFIXterminates,otherwisenexttimeyourun
MFIXinthesamedirectoryitwillterminateimmediately.
rm -f -r ./MFIX.STOP
MFIX2013-2Readmefile
Page90of113
7.18. DiscreteElementModel(DEM)
TheMFIX-DEMmaindocumentationfileistitled"Documentationofopen-sourceMFIX
DEMsoftwareforgas-solidsflows"byR.Garg,J.Galvin,T.Li,andS.Pannala.Itis
availableonlineathttps://mfix.netl.doe.gov/documentation/dem_doc_2012-1.pdf,orin
/mfix/docdirectory.
TheindicateddocumentservesastheuserguideforMFIX-DEManditincludespointers
totheDEMcodeandadiscussionontheassociatedtheory.
MFIX2013-2Readmefile
Page93of113
DESNeighborSearchRelatedflagsneededinDEMmodel
Keyword(dimension) Type Description
DES_NEIGHBOR_SEARCH
[1]
I Neighborsearchalgorithm.1=N-square;
2=quadtree(for2Donly);3=octree(for
3Donly);4=gridbased.Options2and3
havenotbeenrecentlytested.Usethem
atyourownrisk.
NEIGHBOR_SEARCH_N
[25]
I Maximumnumberofstepsthrougha
DEMloopbeforeaneighborsearchwill
beperformed.(Searchmaybecalled
earlier).
MN
[10]
I Maximumnumberofneighborsper
particle.
QLM
[1]
I Numberoflevelstotraverseupto
moveaparticletoitsnewquad.Only
neededwhenusingoctreeorquadtree
basedneighborsearch.
QLN
[1]
I Numberoflevelstotraverseupto
performparticleneighborsearch.Only
neededwhenusingoctreeorquadtree
basedneighborsearch.
INIT_QUAD_COUNT
[UNDEFINEDI]
I Counttoinitializequadtreeoroctree.
Onlyneededwhenusingoctreeor
quadtreebasedneighborsearch.
MQUAD_FACTOR
[1.1]
DP Factortocreatequadtreeoroctree
arraysbasedonthenumberofparticles.
Onlyneededwhenusingoctreeor
quadtreebasedneighborsearch.
NEIGHBOR_SEARCH_RAD_RATIO
[1.0]
DP Ratioofthedistance(imaginarysphere
radius)toparticleradiusthatisallowed
beforeaneighborsearchisperformed.
FACTOR_RLM
[1.2]
DP Effectivelyincreasetheradiusofa
particle(multipleofthesumofparticle
radii)fordetectingneighborcontacts
whenusinggridbasedneighborsearch
orn-squaresearchmethods.
MFIX2013-2Readmefile
Page94of113
Particle-Particle and Particle-Wall Contact Parameters for soft-spring
collisionmodelinDEM
e
n23
e
n33
.
DES_ET_INPUT
[UNDEFINED]
DP Tangentialrestitutioncoefficientfor
interparticlecollisions.Valuesarestoredas
aonedimensionalarray.Onlyneeded
whenusingtheHertziancollisionmodel.
DES_EN_WALL_INPUT
[UNDEFINED]
DP Normalrestitutioncoefficientforparticle
wallcollisionsthatisusedtodeterminethe
particle-wallnormaldampingfactor(see
cfassign.ffordetails).Valuesarestoredas
aonedimensionalarray.So,ifMMAX=3,
then3valuesareneeded,whichare
definedasfollows:e
nw1
e
nw2
e
nw3
.
MFIX2013-2Readmefile
Page95of113
DES_ET_WALL_INPUT
[UNDEFINED]
DP Tangentialrestitutioncoefficientforparticle
wallcollisions.Valuesarestoredasaone
dimensionalarray.Onlyneededwhenusing
theHertziancollisionmodel.
KN
[UNDEFINED]
DP Normalspringconstantforinter-particle
collisions.Valuesarestoredasaone
dimensionalarray.Neededwhenusingthe
default(LSD)collisionmodel.
KT_FAC
[2/7]
DP Ratioofthetangentialspringconstantto
normalspringconstantforinter-particle
collisions.Useittospecifythetangential
springconstantforparticle-particle
collisionsasKT_FAC*KN.Neededwhen
usingthedefault(LSD)collisionmodel.
DES_ETAT_FAC
[0.5]
DP Ratioofthetangentialdampingfactortothe
normaldampingfactorforinter-particle
collisions.Neededwhenusingthedefault
(LSD)collisionmodel.
KN_W
[UNDEFINED]
DP Normalspringconstantforparticle-wall
collisions.Neededwhenusingthedefault
(LSD)collisionmodel.
KT_W_FAC
[2/7]
DP Ratioofthetangentialspringconstantto
normalspringconstantforparticle-wall
collisions.Useittospecifythetangential
springconstantforparticle-wallcollisionsas
KT_W_FAC*KN_W.Neededwhenusing
thedefault(LSD)collisionmodel.
DES_ETAT_W_FAC
[0.5]
DP Ratioofthetangentialdampingfactortothe
normaldampingfactorforparticlewall
collisions.Neededwhenusingthedefault
(LSD)collisionmodel.
MEW
[UNDEFINED]
DP Particlefrictioncoefficient.
MEW_W
[UNDEFINED]
DP Particle-wallfrictioncoefficient.
MFIX2013-2Readmefile
Page96of113
E_YOUNG
[UNDEFINED]
DP Youngsmodulusforthesolidphase.Only
neededwhenusingtheHertziancollision
model.
V_POISSON
[UNDEFINED]
DP Poissonratioforthesolidphase.Only
neededwhenusingtheHertziancollision
model.
EW_YOUNG
[UNDEFINED]
DP Youngsmodulusforthewall.Onlyneeded
whenusingtheHertziancollisionmodel.
VW_POISSON
[UNDEFINED]
DP Poissonratioforthewall.Onlyneeded
whenusingtheHertziancollisionmodel.
DESOutputAndRestartControl
Keyword(dimension) Type Description
DEBUG_DES
[.FALSE.]
L PrintoutadditionalinformationfromDEMmodel.
PRINT_DES_DATA
[.FALSE.]
L PrintDEMoutputtofiles.
DES_RES_DT
[UNDEFINED]
DP IfPRINT_DES_DATA,thisisthefrequencyatwhich
DES.RESand.RESfileswillbewritten.Thisonly
appliestopuregranularsimulations,otherwisefor
coupledsimulationtherestartfrequencyiscontrolled
byRESDT.
DES_SPX_DT
[UNDEFINED]
DP IFPRINT_DES_DATA,thisisthefrequencyatwhich
DEMdatawillbewritten.Thisonlyappliestopure
granularsimulations,otherwiseforcoupled
simulationtheoutputfrequencyiscontrolledby
SPX_DT(1).
DEM_OUTPUT_TYPE
[UNDEFINED_C]
C Ifundefinedthedefaultvtpfilesarewritten.Other
optionsinclude:TECPLOT.Iftecplotisspecified
thenseveral.datfilesarewrittenincluding
DES_DATA.dat&AVG_EPS.dat.See
write_des_data.ffordetails.
MFIX2013-2Readmefile
Page97of113
DEMMassInlet/OutletSpecifications:
DEMmassinletoroutlet(bc)arespecifiedoverflowplanesor2Dsurfacesthatare
normaltooneofthecoordinatedirectionsandcoincidewithafaceofthescalarcontrol-
volume.Thevaluesforoneofthethreepairsofcoordinatesareequal.Thesurfaceis
definedbytheconstantcoordinatesofeachofthefouredgesandthetwoequalvalues
forthedirectionnormaltotheface.Thesearespecifiedwithphysicalcoordinates.A
flowplanemusthaveawallcell(oranoutsideboundary)ononesideandaflowcellon
theotherside
Foramassinflowboundarythediscretesolidsflowratesarespecifiedasthevolumetric
ormassflowrates.Thephase-Mflowratesareconvertedtoanequivalentnumberof
phase-mdiscreteparticlesenterthesystem.Auniforminletvelocityisthenselected
thatminimizestheerrorbetweenthespecifiedbulkdensityvaluesandthecalculated
bulkdensityvalues.FordetailsseeMusseretal.,Developmentofadiscretemass
inflowboundaryconditionforMFIX,JournalofSystemics,CyberneticsandInformatics
(JSCI),Volume9,Number1,2011,pg94-98.
Keyword(dimension) Type Description
MAX_PIS
[UNDEFINED_I]
I Maximumnumberofparticlesthat
mayexistwithinasimulation.This
quantityisusedforcalculatingthe
sizeofarraysforallocation.
DES_BC_X_w(bc)
[UNDEFINED]
DP xcoordinateofthewestface
DES_BC_X_e(bc)
[UNDEFINED]
DP xcoordinateoftheeastface
DES_BC_Y_s(bc)
[UNDEFINED]
DP ycoordinateofthesouthface
DES_BC_Y_n(bc)
[UNDEFINED]
DP ycoordinateofthenorthface
DES_BC_Z_b(bc)
[UNDEFINED]
DP zcoordinateofthebottomface
DES_BC_Z_t(bc)
[UNDEFINED]
DP zcoordinateofthetopface
MFIX2013-2Readmefile
Page98of113
DES_BC_TYPE(bc)
[UNDEFINED_C]
C Typeofboundary:
MASS_INFLOWorMI Massinflowratesfordiscretesolids
phasesarespecifiedattheboundary.
MASS_OUTFLOWorMO Thisdesignatesthespecifiedregion
asadiscretemassoutflowwherein
discreteparticlesmayexitthe
system.Onceaparticlecenterhas
crossedthemassoutflowplaneitwill
continueonthattrajectoryuntilit
movesfullyoutofthedomain.
DES_BC_VOLFLOW_s(bc,m)
[UNDEFINED]
DP Volumetricflowrateofdiscretesolids
phaseMthroughthemassinlet
boundary.
DES_BC_MASSFLOW_s(bc,m)
[UNDEFINED]
DP Massflowrateofdiscretesolids
phaseMthroughthemassinlet
boundary.
DES_ROP_s(bc,m)
[UNDEFINED]
DP Macroscopicbulkdensityofdiscrete
solidsphasesattheBCplane.
FORCE_ORD_BC
[.FALSE.]
L Logicaltoforcetheinlettooperate
withanorderedboundarycondition.
Thismaybeusefulduringlong
simulationsoriftheinletappearsto
betakingalongtimetorandomly
placeparticles.
DES_BC_T_s(bc)
[UNDEFINED]
DP Temperatureofincomingparticles.
DES_BC_X_s(bc,m,n)
[UNDEFINED]
DP Massfractionofsolidsphasem
speciesnforincomingparticles.
DEMInitialConditions:
Eachinitialcondition(IC)isspecifiedoverarectangularregionthatcorrespondstothe
scalarnumericalgrid.Theseare3Dregions:X_wX_e,Y_sY_n,andZ_tZ_b.Initial
conditionregionsareusedtospecifyparticleproperties.TheDEMinitialconditionsare
onlyrelevantwhensolvingDEMenergyand/orspeciesequations(seebelowforDEM
energyandreactivechemistryrelatedkeywords).
MFIX2013-2Readmefile
Page99of113
Keyword(dimension) Type Description
DES_IC_X_w(ic)
[UNDEFINED]
DP xcoordinateofthewestface
DES_IC_X_e(ic)
[UNDEFINED]
DP xcoordinateoftheeastface
DES_IC_Y_s(ic)
[UNDEFINED]
DP ycoordinateofthesouthface
DES_IC_Y_n(ic)
[UNDEFINED]
DP ycoordinateofthenorthface
DES_IC_Z_b(ic)
[UNDEFINED]
DP zcoordinateofthebottomface
DES_IC_Z_t(ic)
[UNDEFINED]
DP zcoordinateofthetopface
DEMEnergyEquations:
Keyword(dimension) Type Description
DES_ENERGY_EQ
[.FALSE.]
L SolveenergyequationsforDEM.
DES_CONV_EQ
[.TRUE.]
L Includeparticle-gasconvectioninDEM
heattransfermodel.
DES_COND_EQ
[.TRUE.]
L Includeparticle-particleconductionin
DEMheattransfermodel.
DES_COND_EQ_PP
[.TRUE.]
L Includeparticle-particlecontact
conductioninDEMheattransfermodel.
(RequiresDES_COND_EQsettotrue.)
DES_COND_EQ_PFP
[.TRUE.]
L Includeparticle-fluid-particleconduction
inDEMheattransfermodel.(Requires
DES_COND_EQsettotrue.)
DES_RADI_EQ L Includeparticle--particleradiationinDEM
heattransfermodel.
MFIX2013-2Readmefile
Page100of113
[.TRUE.]
DES_CONV_CORR
[RANZ_1952]
C SpecifytheNusseltnumbercorrelation
usedforparticle-gasconvection.(Only
RANZ_1952ispresentlyincluded.)
FLPC
[1.0/5.0]
DP Fluidlensproportionconstantusedto
calculatetheradiusofthefluidlensthat
surroundsaparticle.Usedintheparticle-
fluid-particleconductionmodel.
DES_K_s0(m)
[UNDEFINED]
DP Specifiedconstantsolidsthermal
conductivityofsolidsphasem.
DES_C_ps0(m)
[UNDEFINED]
DP Specifiedconstantsolidsspecificheatof
solidsphasem.
DES_Em(m)
[UNDEFINED]
DP Emissivityofsolidsphasem.
DES_MIN_COND_DIST
[UNDEFINED]
DP Minimumseparationdistancebetween
thesurfacesoftwocontactingparticles.
DEMReactiveChemistryModel:
KeywordsforspecifyingDEMreactionsarelistedbelow.Acompletedescriptionof
specifyingchemicalreactionsisprovidedinSection6.12.
Keyword(dimension) Type Description
DES_SPECIES_EQ(m)
[.FALSE.]
L Solvethespeciesequationsforsolids
phasem.
DES_NMAX_s(m)
[UNDEFINED_I]
I Numberofspeciescomprisingsolids
phasem.
DES_SPECIES_s
[UNDEFINED_C]
C Name of solids phase m, species n as it
appears in the materials database
DES_SPECIES_ALIAS_s(m,n)
[UNDEFINED_C]
C
Userdefinednameofsolidsphasem,
speciesn
REACTION_MODEL
[VARIABLE_DENSITY]
C Reactionmodelusedtocalculatethe
effectsofagas-solidsreactionona
MFIX2013-2Readmefile
Page101of113
particle.
VARIABLE_DENSITY Constantparticlediameter.Particle
diameterchangestoaccommodatea
loss/gaininmass.
SHRINKING_PARTICLE Constantparticledensity.Particles
diameterchangestoaccommodatea
loss/gasinmass.
DEMContinuumHybridModel:
Listedbelowarethekeywordsneededtoinvokeahybridschemewhereinsolidsinthe
samesystemcanbesimultaneouslymodeledusingtheDiscreteElementand
ContinuumModels.Notethatanyandallparameters/quantitiesthatareneededfor
runningastandard,stand-alonecontinuummodelordiscreteelementmodelarestill
required.However,differentvariablesareusedtospecifythenumberofdiscretesolids
phases,theirdiameteranddensity.Atthistimeallofthediscreteandcontinuumsolids
phasesinteractviaasolids-solidsdragliketermadaptedfromD.Gera,M.Syamlal,T.J.
O'Brien,Hydrodynamicsofparticlesegregationinfluidizedbeds,InternationalJournal
ofMultiphaseFlow,v30,2004,p419-428.Thistermhasseveralparametersthatmay
becontrolledincludingthecoefficientoffriction(C_F)andthe
SEGREGATION_SLOPE_COEFFICIENT,whicharediscussedinthePhysical
Parameterssection.
Keyword(dimension) Type Description
DES_CONTINUUM_HYBRID
[.FALSE.]
L Invokethehybridscheme.
DES_MMAX
[UNDEFINED_I]
I Numberofdiscretesolidsphasem.
DES_D_P0(m)
[UNDEFINED]
DP Particle diameter associated with
discrete solids phase m
DES_RO_S(m)
[UNDEFINED]
DP
Particledensityassociatedwithdiscrete
solidsphasem
MFIX2013-2Readmefile
Page102of113
DESclusterdetection
Datadescribingdiscreteparticlesclusterscanbegatheredbyspecifyingthefollowing
keywords.
Additionalclusterdetectionconsiderations:
Thedetectionalgorithmistimeconsumingandwillincreasesimulationruntime.
Onlyclusterswith3ormoreparticlesaretracked.
Thealgorithmisinvokedatthesamefrequencyasdes_spx_dtforpureDEM
simulationsandspx_dt(1)forcoupledDEMsimulations.
Theclustersize(i.e.,numberofparticlescomprisingthecluster),volumefraction,
ReynoldsNumber,slipvelocity,anddiameterarerecordedinclusterInfo.datfile.
ClusterinformationiscollectedandprocessedbyPRINT_CLUSTERSlocatedin
model/des/des_cluster_mod.f.Thisinformationisreportedforcluster
sizesoffourormore.
ClustersizeisrecordedintheDEMoutputfiles(*.vtp).
InsettingCLUSTER_LENGTH_CUTOFF,theusershouldconsiderthecutoff
distanceimposedbyneighbordetectionviathekeywordfactor_RLM.
MFIX2013-2Readmefile
Page103of113
7.19. MPPICmodel:
TheMFIX-DEMmaindocumentationfileistitled"Documentationofopen-sourceMFIX
PICsoftwareforgas-solidsflows"byR.GargandJ.F.Dietiker.Itisavailableonlineat
https://mfix.netl.doe.gov/documentation/mfix_pic_doc.pdf,orin/mfix/docdirectory.
TheindicateddocumentservesasthetheoryguidefortheMPPICmodel
implementationdetailsinMFIXcode.TheMFIXcodewithMPPICmodelisreferredto
asMFIX-PICintheindicateddocumentandhereinafter.Abriefdiscussiononsettingup
ofinputfileforMPPICmodelassumesreadersfamiliaritywiththeMPPIC
documentation.
TheMPPICmodelisinvokedbysettingMPPICflagtoTRUEinconjunctionwith
DISCRETE_ELEMENTsettoTRUE.TheinitialconditionsfortheMPPICmodelare
specifiedinthesamewayascontinuummodel.Itisnotedthatthisisadeparturefrom
theDEMmodelinMFIXwheretheinitialconditionforsolidphasewasspecifiedby
specialDEMrelatedflags.Althoughthephysicalregionwheretheparcelsareseededis
specifiedbythesameflagsasthoseusedincontinuummodelsetup,thereisstillneed
tospecifythenumberofparcelspercellandtheirstatisticalweights.Therearetwo
methodstospecifytheinitialseedingofparcels.Inbothmethods,theuserfirstdefines
thephysicalregionwheretheinitialsolidswillbeseeded.Asdiscussedearlier,thisis
donebythesameflagsthatareusedincontinuumrepresentationofdispersedphase.
Inthefirstmethod,theuserspecifiesthenumberofparcelspercellbythesettingthe
flagCONSTANTNPCtoTRUEandspecifyingnumberofparcelspercellforeach
phasebythearrayNPC_PIC.Inthiscase,theuserdefinednumberofparcelspercell
arerandomlyseededintheinitialphysicalregionspecifiedbyuser.Thestatistical
weightisassignedtoparcelssuchthatthesolidvolumefractionimpliedbyparcels
equalstheuserdefinedsolidvolumefraction(seetheMPPICdocumentation).
Inthesecondmethod,thestatisticalweightofparcelsisfixedbysettingtheflag
CONSTANTWTtoTRUEalongwithspecifyingthestatisticalweightofparcels
belongingtoeachphasebythearraySTATWT_PIC.Thenumberofparcelspercellis
computedbythecodesuchthatthesolidvolumefractionimpliedbyparcelsequalsthe
userdefinedsolidvolumefraction.
ThecurrentimplementationofMPPICmodelalsohasthefrictionalstressmodel
implementationoutlinedinSniders[1]paper.Thisisbasedonourbestunderstanding
ofthemodelfromthepaper.Thismodeldoesnotsimulateverystably.
TheminimumgasvoidageatmaximumpackingbeyondwhichtheMPPICfrictional
stressmodelgetsinvokedisstilldefinedbytheflagEP_STARthatisgenerallyusedin
continuumrepresentation.
NotethatMPPICmodelhasnotbeentestedwithMPImodules.Ithas
onlybeentestedinserialcompilationmode.Itwillworkwithcut-cell
modulesinMFIX,butthereneedstobeworkdonetoensureconservative
couplingbetweenthetwophases.
MFIX2013-2Readmefile
Page104of113
BelowisthedescriptionofMPPICmodelrelatedflagsneededtosetupMFIXinputfile.
Keyword(dimension) Type Description
MPPIC
[.FALSE.]
L UsetheMPPICparcelbased
representationfordispersedphase.
MPPIC_CONSTANTNPC
[.TRUE.]
L Asetnumber(NPC_PIC)ofparcelsper
cellareinitiallyrandomlyseeded.
Statisticalweightiscomputedbythe
code.
MPPIC_CONSTANTWT
[.TRUE.]
L Initiallyparcelsarerandomlyseededwith
userdefinedstatisticalweight
(STATWT_PIC).Thenumberofparcels
percelliscomputedbythecode.
NPC_PIC
[UNDEFINED]
I Desirednumberofparcelspercellwhen
MPPIC_CONSTANTNPCistrue.
STATWT_PIC
[UNDEFINED]
DP Desiredstatisticalweightofparcelswhen
MPPIC_CONSTANTWTistrue.
MPPIC_COEFF_EN1
[UNDEFINED]
DP Firstfrictionalcoefficientofrestitution
(seetheMPPICmodeltheoryguide).
MPPIC_COEFF_EN2
[UNDEFINED]
DP Secondfrictionalcoefficientofrestitution
(seetheMPPICmodeltheoryguide).
MPPIC_COEFF_EN_WALL
[UNDEFINED]
DP Normalcoefficientoffrictionforparcel-
wallcollisioninMPPICmodel
MPPIC_GRAV_TREATMENT
[TRUE]
L Toturnonthespecialcaseinfrictional
modelwhentheimpulsevelocitys
directioniscollinearwithgravity(seethe
MPPICmodeltheoryguide).
MPPIC_DRAG_IMPLICIT
[.FALSE.]
L Forimplicittreatmentofthedragforce
terminparcelgoverningequations.
CFL_PIC
[0.1]
DP CFLnumberusedtodecidemaximum
timestepsizeforparcelsevolution
equations.
MFIX2013-2Readmefile
Page105of113
BC_APPLY_TO_MPPIC
[.TRUE.]
L Specialflagtoturnoffapressureoutlet
boundaryconditionspecificallyonthe
solidsphase.Forexample,ifpressure
outletBCisselectedbuttheuserdoes
notwantthesolidstoleavethesystem,
thensetthisflagto.FALSE.
MPPIC_SOLID_STRESS_SNIDER
[.FALSE.]
L TurnonSnidersversionoffrictional
model.Doesnotrunverystably.
PSFAC_FRIC_PIC
[100]
DP Psterminthefrictionalstressmodelof
Snider
FRIC_EXP_PIC
[2.5]
DP Betaterminthefrictionalstressmodelof
Snider
FRIC_NON_SING_FAC
[1E-07]
DP Non-singularityterm(epsilon)inthe
frictionalstressmodelofSnider
MFIX2013-2Readmefile
Page106of113
7.20. DirectQuadratureMethodofMoments(DQMOM)
ExampleusingDQMOM
Theexamplecaseisafluidizedbedsimulationwithtwosolidphases;eachhasitsown
particlesize.Inthecode,thepopulationbalanceequationisturnedon.Ifaggregation
dominates,theaverageparticlesizewillincrease.Ifbreakagedominates,theaverage
particlesizewilldecrease.TheusercanturnoffDQMOMbysetCall_DQMOM
=.FALSE..TheODEsolverforthescalarintheMFIXcodesolvesthepopulation
balanceequation,soNscalarhastobesetasthenumberofsolidphases.Theinitial
valuesforthescalararesetastheinitialparticlediameter.Theaggregationand
breakagekernelfromkinetictheoryisused.Thesuccessfactorofaggregationand
breakagecanbechangedbysettingdifferentvaluesforAggregation_effand
Breakage_eff.Anexamplemfix.datfileisincluded.
MFIX2013-2Readmefile
Page107of113
7.21. QuadratureMethodofMoments(QMOM)
Pleaserefertothefollowingdocumentforabriefdescriptionoftheimplementationand
utilizationofthequadraturemethodofmoments(QMOM):A.Passalacqua,andR.O.
Fox,Documentationofopen-sourceMFIX-QMOMsoftwareforgas-solidsflows,
availablefromhttps://mfix.netl.doe.gov/documentation/qmomkdoc_2012-1.pdf
7.22. CohesionModelinDEM
Cohesiveinterparticleforcesrepresentanadditiontothediscrete-particlesimulation.
Therawcodeforthisadditionwaslocatedinthemfix/model/cohesiondirectory.These
forcescanbeimplementedusingbothasquare-wellmodelandaHamakervander
Waalsmodel.Cohesiveforcesareturned-onbysettingthelogicalvariable
USE_COHESIONequaltotrueinthemfix.datfile.
Square-Wellmodel
Thenatureofthesquare-wellmodelisdeterminedbythewellwidth(r
outer
)andthewell
depth(D).Bothoftheseparametersarespecifiedinthemfix.datfile.Furthermore,the
simulationissetuptouseaseparatesetofsquare-wellparameterswithparticle-particle
interactionsandparticle-wallinteractions.Generally,thewelldepthissettobetwiceas
largeforparticle-wallinteractionstobeconsistentwiththeincreasedsurfacecontact
thatwouldexistinsuchinteractions.
Withinthesquarewellmodel,cohesiveinteractionsareimplementedasinstantaneous
momentumimpulses(J
*
)resultinginachangeinparticlevelocityasshownbelow:
,* ij * pre , i post , i
J m m k v v
= (1)
wheremistheparticlemass,
pre , i
v
isthepre-interactionvelocity,
post , i
v
isthepost-
interactionvelocityand
,* ij
k
istheunitvectorconnectingtheparticlecenters.This
treatmentleadstothreetypesofcohesiveinteractionsinthesquare-wellmodel:
approachingcohesiveinteractions,escapingcohesiveinteractionsandcapture
cohesiveinteractions.Themomentumimpulseduringeachoftheseinteractionscanbe
calculatedbysolvingthemomentumbalancealongwiththestipulationthatthetotal
kineticenergyofthetwo-particlesystemchangesbythedepthofthesquarewell(D).
Thistreatmentleadstothefollowingexpressionsforthemomentumimpulseineach
typeofinteraction:
( )
+ =
2
1 1
4
2
a , ij , ij a , ij , ij app , coh
v k
m
D
v k
m
J
(2)
MFIX2013-2Readmefile
Page108of113
( )
+ =
m
D m
J
c , ij , ij c , ij , ij esc , coh
4
2
2
3 3
v k v k
(3)
( )
c , ij , ij cap , coh
v k m J
=
3
(4)
Becausecohesiveinteractionsareimplementedonlyonceonapproachandonceasthe
particlesdepart,theidentificationofasquare-wellinteractioncannotbedonesimply
usingtheseparationdistance.Specialbook-keepingisemployedtoensurethatsquare-
wellcohesiveinteractionsareimplementedonlyduringthetimestepwhenthewell-
widthsfirstbecomeoverlappedforapproachinginteractionsandwhentheyfirstbecome
un-overlappedfordepartinginteractions.Thisbook-keepinginvolvesrecordingalistof
linksforeachparticle.Twoparticlesareconsideredlinkedistheirseparationdistance
islessthanthewidthoftheirsquare-wells(thesquare-wellsoverlap).Thelistoflinksis
updatedateverycohesiveinteraction.Cohesivesquare-wellinteractionsare
recognizedusingboththelistoflinksandtheparticleseparationdistanceateach.For
example,anapproachingcohesiveinteractionisonlyimplementediftwoparticles
overlaptheirsquare-wells,yettheyarenotontheirrespectivelistoflinks.Theparticles
willbeaddedtoeachlistduringtheinteractionandatthenexttimestep,theymaystill
haveoverlappedsquare-wells,butaninteractionwillnotbeimplementedbecausethey
particlesarealreadyontheirrespectivelistoflinks.Asimilaralgorithmisusedto
identifydepartinginteractions.
Hamakermodel
The Hamaker model for van der Waals forces predicts the cohesive force between
equal-sized,sphericalparticlesaccordingtothefollowingequation[1]:
2
12H
Ar
F
inner
vdW
= (5)
where
inner
r istheparticleradius;AistheHamakerconstant,whichisspecifictoagiven
materialandhastypicalvaluesontheorderof10
-20
J;and H istheminimumsurface-to-
surfaceseparationdistancebetweentwoparticlesiandj:
( ) ( )
inner j i j i
r y y x x H 2
2 2
+ = (6)
Thecorrespondingcohesiveforcebetweenasphericalparticleandaflatwallis[1]:
2
6H
r A
F
inner wall
wall , vdW
= (7)
Forbothoftheseexpressions,thecohesiveforceapproachesinfinityastheseparation
distance approaches zero. This singularity incurred at particle contact is avoided by
MFIX2013-2Readmefile
Page109of113
introducingacutoffdistance,
cut
H .Forseparationdistancesbelowthiscutoffdistance,
theinterparticlecohesiveforceisgivenbyasurfaceadhesionforce(
ad
F )model[2].
inner ad
r F 2 = (8)
where is a constant surface energy per unit area. The contact surface energy is
calculatedatthebeginningofeachsimulationbasedonthespecifiedHamakerconstant
and cutoff distance toensurethat the force is continuous at the cutoffdistance. Thus,
thecohesiveforceismaintainedataconstantvalueforanyseparationdistances(based
on equation 6) below the minimum cutoff distance, which includes any negative
separationdistancesthatoccurduringactualparticlecontact.
CohesiveInteractionSearch
Cohesiveinteractionsareidentifiedusingamethodseparatefromthefunctionsusedto
identifyparticlecontactsinthediscrete-particlemodel.Thesimulationdomainis
dividedupintosearchgridsinordertoreducethenumberofparticlesthatmustbe
checkedforinteractionsbyeachparticle.Thesearchgridismadeupofseveraluniform
boxesthataredefinedtobeatleastaswideasthelargestlength-scaleinthecohesive
forces.Inthisway,particlesareonlycheckedagainstotherparticlesintheirboxand
adjacentboxes.Thesizeofthesearchboxesensuresthataparticlecouldnothavean
interactionwithparticlesthatarelocatedinboxesoutsidetheadjacentboxes.The
arraysrecordingtheindicesofthesearchboxforeachparticleareupdatedateachtime
step(update_search_grids.f).NotethatthevanderWaalsmodelusesthesamesearch
algorithmasforDEMcollisionsandisfullyparallelizedunlikethesquare-wellmodel.
CohesionVariables
A new capability, called Cartesian grid cut-cell technique has been implemented in
MFIX, which allows the definition of curvedor sloping boundaries, instead of the usual
stair-steprepresentation.Computationalcellsaretruncatedatthewalltoconformtothe
shape of the boundaries. When a face is truncated, the velocity node is moved to the
centeroftheface.Thecelltruncationintroducesanadditionalface,calledthecutface.
Face surface areas and cell volumes are updated based on the shape of the cut cell.
Thecontributionofthenewcutfaceisaddedtothecomputation.Thedatacanbesaved
inavtkfileforpost-processingpurpose.
AdetaileduserguidenamedCartesian_grid_user_guide.pdfislocatedinmfix/doc
directory.ItshouldbereadpriortoutilizingtheCartesiangridoptiontogetfamiliarwith
thistechnique,andassociatedkeywords.Thisfileisalsoavailableonlineat
https://mfix.netl.doe.gov/documentation/Cartesian_grid_user_guide.pdf.
MFIX2013-2Readmefile
Page112of113
8. Mailinglists
SeveralmailinglistsareavailabletocommunicateamongMFIXusersanddevelopers.
When your subscription to MFIX is accepted, you are automatically added to the mfix-
news mailing list, where important announcements about MFIX are shared with the
MFIXcommunity.
Themostwidelyusedmailinglistismfix-help,whichallowsuserstopostquestionsand
eventuallyhelpotheruserswithsimilarissues.
Once you subscribe to a list, you can send/receive messages to/from the MFIX
community.Youcanalsosearcharchivedmessagestoseeifthereisalreadyasolution
toacommonproblem.
Pleasevisithttps://mfix.netl.doe.gov/sympa/help/usertoviewthemailinglistuserguide.
Mailinglistetiquette:
1) Pleaseallowsufficienttime(say2to3businessdays)forMFIXdevelopersand
userstoreplybeforepostingunansweredquestionsagain.
2) Unless prior arrangement has been made with a given MFIX developer, do not
send requests directly to the developer, but send the request to the appropriate
mailing list instead. This ensures proper archiving of the thread and provides
betteropportunityforeveryonetoreply.Follow-upquestionsshouldalsobesent
tothemailinglist.
3) Donotaskforacopyofareference,e.g.,ajournalarticle.
4) PriortosubmittinghelprequestsregardingMFIXinstallationorcompilation
issues,pleasecheckthearchivesofmfix-helpandifyouarestillhavinga
problem,emailmfix-help@mfix.netl.doe.govbyprovidingthefollowingimportant
detailsinyourmessageafterthedescriptionoftheproblemencountered:
a. MFIXversionyouaretryingtoinstallorrun
MFIX2013-2Readmefile
Page113of113
b. Somedetailsonyouroperatingsystemenvironment(forLinux:copyand
pastetheresponseofunameacommand,Linuxdistributionnameand
versionalso)
c. Yourcompilernameandversionnumber(e.g.ifortvwillgivetheversion
numberforIntelfortrancompiler)
d. Outputforyour$PATHenvironment(incshtypeecho$PATH)
e. YourMPIlibrarynameandversionnumber(ifcompilationsproblemwith
DMPmodeencounteredbutmakesureyoucancompileandrunasimple
helloworldtypeMPIprogramwithyourcurrentinstallation)Alsoplease
providehardwaredetailssuchasnumberofcorespersocketinyour
system(orsendtheoutputforcat /proc/cpuinfo andhowmanycores
youaretryingtoutilize.
9. Usercontribution
IfyouwishtocontributetothedevelopmentofMFIX,pleasecontacttheMFIXteamat
admin@mfix.netl.doe.gov.Wearelookingforsimulationresults(figures,animations,
inputfiles,user-definedsubroutines),andnewmodelsthatcouldbenefittheentireMFIX
community.IfyouhavewrittenorknowanypublicationthatusesMFIX,pleaseletus
knowandwewillpostthecitationonthewebsite.Propercreditwillbegiventoall
contributors.
Commonreasonsyoumaynotreceiveananswertoyourrequest
1. Youdidnotsubscribetothemailinglist.
2. Yousenttherequesttoanindividualandnottothemailinglist.
3. Your question has already been answered and is available in the
archive.
4. Youdidnotprovidesufficientdescriptionofyourproblem(sayingIt
doesntworkisnotuseful).
5. Yourquestionisoutsidethescopeofthemailinglist.