MoDeNa
1.0
Software framework facilitating sequential multi-scale modelling
|
Predicts the evolution of PU foam properties using the combination of nano-, meso- and macro-scopic models. More...
Namespaces | |
CFD_tool_0D.QmomKinetics | |
Backward mapping Firetask for QmomKinetics model. | |
CFD_tool_3D.CFD_tool_3D | |
Kinetics.Kinetics | |
Kinetics.PrediciKinetics | |
Rheology.Rheology | |
Backward mapping FireTask for rheology model. | |
Rheology_Arrhenius.Rheology_Arrhenius | |
Predicts the evolution of PU foam properties using the combination of nano-, meso- and macro-scopic models.
inputs
directory. Several test cases are prepared in the examples
directory. The unifiedInput.json
file controls the Bubble growth model and the 0D simulation, , wallDrainage_inputs.json
controls the Wall drainage simulation and the rest of the files and directories control the OpenFOAM simulation.physicalBlowingAgent
: name of blowing agent [n-pentane
, R11
]initialConditions
:concentrations
: initial concentrations of reactants and blowing agents (mol/m^3) (always water, PBL, CO2 and for Baser
kinetics: isocyanate, polyol; for RF-1
kinetics: catalyst, polyol1, polyol2, amine, isocyanate1, isocyanate2, isocyanate3)bubbleRadius
: initial bubble radius (m),bubbleRadiusDeviation
: standard deviation of initial BSD,numberBubbleDensity
: initial number density of bubbles (1/m^3),temperature
: initial temperature (K)kinetics
:kineticModel
: name of kinetic model [Baser
, RF-1
],useDilution
: use correction for dilution in Baser model (t/f),gelPoint
: conversion at the gel pointgellingReaction
: parameters of gelling reactionfrequentialFactor
: pre-exponential factor for Baser model (m^3/mol/s),activationEnergy
: activation energy for Baser model (J/mol),reactionEnthalpy
: reaction enthalpy used in all models (J/mol)blowingReaction
:frequentialFactor
: pre-exponential factor for Baser model (1/s),activationEnergy
: activation energy for Baser model (J/mol),reactionEnthalpy
: reaction enthalpy used in all models (J/mol)physicalProperties
:pressure
: (Pa)blowingAgents
:PBL
:molarMass
: (kg/mol)heatCapacityInLiquidPhase
: (J/kg/K)heatCapacityInGaseousPhase
: (J/kg/K)evaporationHeat
: (J/kg)density
: (kg/m^3)diffusivityModel
: [constant
,nanotools
],diffusivity
: diffusivity when constant
diffusivityModel is used (m^2/s)solubilityModel
: [constant
, pcsaft
, Gupta
, Winkler
, Baser
] Gupta and Winkler are models for n-pentane, Baser is model for R11CO2
:molarMass
: (kg/mol)heatCapacityInLiquidPhase
: (J/kg/K)heatCapacityInGaseousPhase
: (J/kg/K)evaporationHeat
: (J/kg)density
: (kg/m^3)diffusivityModel
: [constant
,nanotools
],diffusivity
: diffusivity when constant
diffusivityModel is used (m^2/s)solubilityModel
: [constant
, pcsaft
]solubility
: solubility when constant
solubilityModel is used (mol/m^3/Pa)air
:molarMass
: (kg/mol)polymer
:heatCapacity
: (J/kg/K)polymerDensityModel
: [constant
, nanotools
, pcsaft
],density
: when constant
polymerDensityModel is used (kg/m^3)viscosityModel
: [CastroMacosko
],maxViscosity
: maximum viscosity - for gel point detection (Pa s),molarMassNCO
: (kg/kmol)surfaceTensionModel
: [constant
pcsaft
],surfaceTension
: surface tension when constant
is used (N/m)ModenaFoamViscosityModel
: use TUE model to calculate foam viscosity (t/f)bubbleGrowth
:geometry
: [3D
,2D
]integrator
: [dlsode
, dlsodes
, 'cvode'] dlsodes is recommendedmethod
: [nonstiff
, stiff
] stiff is recommendedinertialTerm
: [t/f] use inertial term in bubble growth modelsolubilityCorrection
: [t/f] use solubility correction on surface tensionmeshCoarseningParameter
: 1.02 is recommendedinternalNodes
: number of nodes in shell around the bubble, 200 is recommendedinitialTime
: (s)finalTime
: (s)outerTimeSteps
: number of outputsmaxInnerTimeSteps
: maximum number of internal time steps of integratorrelativeTolerance
: 1e-8 is recommendedabsoluteTolerance
: 1e-8 is recommendedQmomKinetics
:relativeTolerance
: 1e-6 is recommendedabsoluteTolerance
: 1e-6 is recommendedtimeStep
: (s)endTime
: (s)bubbleMode
: [mean radius
, two nodes
]0
directory: initial and boundary conditions can be defined. Further details can be found in OpenFOAM UserGuidesystem
directory: includes dictioneries to control the simulation details such as time discretization, solution methods and etc. For further details, one should consult with OpenFOAM UserGuideconstant
directory: includes the mesh and and dictionaries to define the physical properties of fluid flow. There are also additional dictionaries, specifically for PU foam.kineticsProperties
: defines the details of kinetics schemeliquidMixtureDensitySurrogate
: enable the surrogate model for mixture density [on/off],blowingAgent
: name of blowing agent [n-pentane, R-11],kineticsModel
: name of kinetics model [generic, RF-1],GellingConstants
: constants for the gelling reactionA_OH
: pre-exponential factor (m^3/mol s),E_OH
: activation energy (J/mol),initCOH
: initial concentration of polyol OH groups in the mixutre (mol/m3),initCNCO
: initial concentration of isocianate NCO groups in the mixutre (mol/m3),initCW
: initial concentration of water in the mixture (mol/m3),gellingPoint
: gelling pointBlowingConstants
constants for the blowing reactionA_W
: pre-exponential factor (m^3/mol s),E_W
: activation energy (J/mol)GenericConstants
: generic constantsidealGasCons
: ideal gas constant (J/mol K),rhoPolymer
: density of the liquid polymer (kg/m^3),rhoBlowingAgent
: density of the blowing agent (kg/m3),molecularMassCO2
: molecular mass of carbon dioxide, (kg/kmol),molecularMassBlowingAgent
: molecular mass of blowing agent (kg/kmol),molecularMassNCO
: molecular weight of NCO (kg/kmol),molecularMassLiquidFoam
: molecular weight of liquid mixture (kg/kmol),dissolvedCO2
: weight fraction of dissolved CO2 in the mixture (kg/kg),dxdTcons
: model constant for the blowing agent (-0.01162790697 is recommended),initBlowingAgent
: initial weight fraction of blowing agent in the liquid (kg/kg),initCO2
: initial weight fraction of CO2 in the liquid (kg/kg),surfaceTension
: surface tensionEnthalpyConstants
: constant for energy equationdeltaOH
: reaction heat for the gelling reaction (J/mol),deltaW
: reaction heat for the blowing reaction (J/mol),PUspecificHeat
: polyurethane specific heat (J/kg K),CO2specificHeat
: CO2 specific heat (J/kg K),BGspecificHeat
: physical blowing agent in gas phase specific heat (J/kg K),BLspecificHeat
: physical blowing agent in liquid phase specific heat (J/kg K),latentHeat
: latent heat of blowing agent (J/kg)PBEProperties
: defines the details of population balance solutionPBESwitch
: enbale PBE model [on/off],PBEMethod
: solution method for PBE. In the current version QMOM
is available.nNodes
: number of quadrature approximation nodes [2-3],bubbleGrowthSurrogateSwitch
: enable bubble growth surrogate model [on/off],bubbleGrowthMode
: use of mean bubble radius or two nodes [meanRadius, twoNodes].rheologyProperties
: define the rheology model (further details)viscosityModel
: viscosity model [constant, castro-macosko, bird-carreau]simulationMode
: defines the how long the simulation should runsimulationTarget
: two different modes for the simulation: mold-filling and validation. Mold-filling would disable the solution of equations when the mould is filled and validation would continue until the defined end time.growthRateModel
: fromFile
uses evolution of bubble radius from Bubble growth model [constant
,fromFile
],growthRate
: growth rate when constant
growth rate model is used (m/s),initialConditions
:centerThickness
: initial film half thickness at the center (m),domainSize
: initial size of the domain (m),filmReduction
: parameter influencing initial shape of wall and strut (0.0 = only wall, 1.0 = only strut), 1.0 is recommended,physicalProperties
:viscosityModel
: fromFile
uses evolution of viscosity from Bubble growth model [constant
,fromFile
],viscosity
: viscosity when constant
viscosity model is used (Pa s),surfaceTension
: (N/m),disjoiningPressure
: parameters of disjoining pressure, consult Schwarz and Roy (2003)N
: 4.0,M
: 3.0,hst
: 1.0e-7,C
: 0.05,B1
: 0, if B1=0
disjoining pressure is neglectedintegration
:initialTime
: (s),timeStep
: write interval (s),outerTimeSteps
: number of outputs,method
: stiff
is recommended [nonstiff
, stiff
],internalNodes
: discretization - number of finite volumes,maxInnerTimeSteps
: maximum number of internal time steps of integrator,relativeTolerance
: 1e-8 is recommended,absoluteTolerance
: 0 is recommendedalgebraicEquationSolver
:tolerance
: 1e-4 is recommendedstrutFilmParameter
: parameter for detection of wall/strut 1.1 is recommendedT
: list of temperatures (K)dcell
: list of cell sizes (m)eps
: list of porositiesfstrut
: list of strut contentsx[CO2]
: list of CO2 molar fractionsx[CyP]
: list of cyclopentane molar fractionsx[N2]
: list of nitrogen molar fractionsx[O2]
: list of carbon dioxide molar fractions build
compiles the necessary models. The surrogate models will be loaded into the database by executing the two scripts provided: initModels
and initBubbleGrowth
. Finally, the scripts workflow*
run the simulations and detailed model for bubble growth.Note 1: This video demonstrates the installation process.Note 2: Consult with official webpage for installation problems.### 2. Install MongoDB C++ Driver
### 3. Install boost, lapack, blas and veusz libraries
### 4. Install PETSc globally:
Export variables in .bashrc
### 5. Install rapidjson library
{HOME}/lib
and {HOME}/include
{HOME}/lib
and {HOME}/include
### 8. Install sundials library
### 9. Set the environmental variables for MoDeNa
### 10. Compile the models
Please note that the output of build should not contain any error messages. Otherwise, the tool cannot work properly.
examples
directory several cases have been provided. One can copy the inputs
directory into the foamExpansion
and modify it for the targeted recipe. The unifiedInput.json
provides the input data for the bubble growth model and zero dimensional simulation, wallDrainage_inputs.json
provides the inputs for the wall drainage simulation, init_foamConductivity.json
provides initial points for the initialization of foamConductivity and the rest of input directory creates the test case for OpenFOAM simulation. The details of the input variables have been elaborated in INPUTS.md
. After preparing the inputs the following steps should be executed:init_foamConductivity.json
. This file can be prepared using prep_init_foamConductivity.py
.initMoments
. This script uses the mean, variance and initial number density of bubbles from unifiedInput.json
.If the following error occurs: ``` –> FOAM FATAL ERROR: Wrong number of arguments, expected 0 found 1
FOAM exiting
cannot find system Renviron Fatal error: unable to open the base package ``` The workaround is to set the R environment variable as below: ``` R_HOME=/usr/lib/R (where you have installed R) export R_HOME=/usr/lib/R ```
./workflow_bubbleGrowth
by: results
directory. We use VEUSZ to visualize some of the results. For example, to look at selected results for a 0D simulation, you can open plotQmom0D.vsz
using VEUSZ. Further, the results of the 3D simulation (stored in the launcher directory) can be displayed using a third party software such as paraview. Additional results can be displayed through python scripts like plotWallDrainage.py
.The Foam aging and Foam conductivity applications can read the final foam morphology from the results of Foam expansion. It is communicated through the after_foaming.txt
file. In case of 3D simulation, average foam morphology is used, but user must specify several points in system/probes
file. Initialize surrogate nano-scale models:
Execute meso-scopic bubble growth simulation:
Initialize surrogate bubble growth model:
Run macroscopic simulation: