MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
Foam aging simulation

Predicts the time-varying composition of blowing agents in PU foam and its thermal properties using the combination of nano-, meso- and macro-scopic models. More...

Namespaces

 diffusivity.diffusivity
 Surrogate function and model definitions for diffusivity of blowing agents in polymer.
 
 gasConductivity.gasConductivity
 Surrogate function and model definitions for thermal conductivity of blowing agents.
 
 gasMixtureConductivity.gasMixtureConductivity
 Surrogate function and model definitions for thermal conductivity of mixture of blowing agents.
 
 polymerConductivity.polymerConductivity
 Surrogate function and model definitions for thermal conductivity of polyurethane.
 
 PolymerDensity_units.density_reaction_mixture
 

Detailed Description

Predicts the time-varying composition of blowing agents in PU foam and its thermal properties using the combination of nano-, meso- and macro-scopic models.

MoDeNa Models used in the Application:

INPUTS

The input files should be located in the inputs folder. foamAging.json controls aging simulation, whereas foamConductivity.json controls foam conductivity simulation. init_foamConductivity.json provides initial points for the initialization of foamConductivity.

Preparing foamAging.json

The following key-pairs should be defined:

  • numerics:
    • timeStart: starting time (s)
    • timeEnd: end time (s)
    • numberOfOutputs: how many times should the intermediate results be written
    • wallDiscretization: number of finite volumes in each wall
    • cellDiscretization: number of finite volumes in each cell
    • sheetDiscretization: number of finite volumes in sheet, if it is used
  • sourceOfProperty: when "DirectInput" is used, the property must be given in this file. Otherwise, it will be loaded from the results of the specified given tool.
    • foamDensity: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • cellSize: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • gasComposition: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • strutContent: ["DirectInput","StrutContent"]
    • wallThickness: ["DirectInput"]
  • foamCondition:
    • foamHalfThickness: half of foam thickness (m)
    • inProtectiveSheet: is foam enclosed in a sheet [true,false]
    • sheetThickness: thickness of the sheet, if it is used (m)
    • agingTemperature: temperature of aging (K)
    • conductivityTemperature: temperature of conductivity measurements (K)
    • initialPressure: initial pressure in foam (Pa)
    • initialComposition:
      • O2: molar fraction of oxygen in initial foam
      • N2: molar fraction of nitrogen in initial foam
      • CO2: molar fraction of CO2 in initial foam
      • Cyclopentane: molar fraction of cyclopentane in initial foam
    • boundaryPressure:
      • O2: pressure of oxygen at the outer boundary (Pa)
      • N2: pressure of nitrogen at the outer boundary (Pa)
      • CO2: pressure of CO2 at the outer boundary (Pa)
      • Cyclopentane: pressure of cyclopentane at the outer boundary (Pa)
  • morphology:
    • foamDensity: foam density (kg/m3)
    • cellSize: cell size (m)
    • strutContent: strut content
    • wallThickness: wall thickness (m)
  • physicalProperties:
    • polymerDensity: polymer density (kg/m3)
    • foam:
      • solubilityModel:
        • O2: solubility model ["constant","modena"]
        • N2: solubility model ["constant","modena"]
        • CO2: solubility model ["constant","modena"]
        • Cyclopentane: solubility model ["constant","modena"]
      • solubility:
        • O2: solubility of oxygen, if "constant" model is used (g/g/bar)
        • N2: solubility of nitrogen, if "constant" model is used (g/g/bar)
        • CO2: solubility of CO2, if "constant" model is used (g/g/bar)
        • Cyclopentane: solubility of cyclopentane, if "constant" model is used (g/g/bar)
      • diffusivityModel:
        • O2: diffusivity model ["constant","modena"]
        • N2: diffusivity model ["constant","modena"]
        • CO2: diffusivity model ["constant","modena"]
        • Cyclopentane: diffusivity model ["constant","modena"]
      • diffusivity:
        • O2: diffusivity of oxygen, if "constant" model is used (m2/s)
        • N2: diffusivity of nitrogen, if "constant" model is used (m2/s)
        • CO2: diffusivity of CO2, if "constant" model is used (m2/s)
        • Cyclopentane: diffusivity of cyclopentane, if "constant" model is used (m2/s)
    • sheet:
      • solubility:
        • O2: solubility of oxygen, if "constant" model is used (g/g/bar)
        • N2: solubility of nitrogen, if "constant" model is used (g/g/bar)
        • CO2: solubility of CO2, if "constant" model is used (g/g/bar)
        • Cyclopentane: solubility of cyclopentane, if "constant" model is used (g/g/bar)
      • diffusivity:
        • O2: diffusivity of oxygen, if "constant" model is used (m2/s)
        • N2: diffusivity of nitrogen, if "constant" model is used (m2/s)
        • CO2: diffusivity of CO2, if "constant" model is used (m2/s)
        • Cyclopentane: diffusivity of cyclopentane, if "constant" model is used (m2/s)

Preparing foamConductivity.json

  • upperBoundary:
    • emittance: numer 0-1, 0.9 recommended
    • temperature: temperature (K)
  • lowerBoundary:
    • emittance: numer 0-1, 0.9 recommended
    • temperature: temperature (K)
  • gasDensity: gas density (kg/m3)
  • solidDensity: polymer density (kg/m3)
  • sourceOfProperty: when "DirectInput" is used, the property must be given in this file. Otherwise, it will be loaded from the results of the specified given tool.
    • porosity: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • cellSize: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • gasComposition: ["DirectInput","BubbleGrowth","Qmom0D","Qmom3D"]
    • strutContent: ["DirectInput","StrutContent"]
    • wallThickness: ["DirectInput"]
  • gasComposition:
    • Cyclopentane: molar fraction of cyclopentane
    • CO2: molar fraction of CO2
    • Air: molar fraction of air
  • useWallThicknessDistribution: [true,false]
  • spatialDiscretization: number of finite volumes for conduction-radiation simulation
  • wallThicknessStandardDeviation: if wall thickness distribution is used
  • morphologyInput: 2 is recommended (strut content is specified, wall thickness and strut size is calculated)
  • foamThickness: foam thickness (m)
  • porosity: foam porosity
  • numericalEffectiveConductivity: [true,false]
  • testMode: [true,false]
  • numberOfGrayBoxes: 10 is recommended
  • strutContent: strut content
  • cellSize: cell size (m)
  • strutSize: initial guess of strut size
  • wallThickness: initial guess of wall thickness

Preparing init_foamConductivity.json

  • T: list of temperatures (K)
  • dcell: list of cell sizes (m)
  • eps: list of porosities
  • fstrut: list of strut contents
  • x[CO2]: list of CO2 molar fractions
  • x[CyP]: list of cyclopentane molar fractions
  • x[N2]: list of nitrogen molar fractions
  • x[O2]: list of carbon dioxide molar fractions

README

Aging of polyurethane foam thermal properties

PU foam is blown by CO2 and cyclo-pentane. In time, CO2 is diffusing out of the foam, whereas air is diffusing into the foam. CO2 has lower thermal conductivity than air. Thus, thermal conductivity of the foam is increasing in time.Mathematical models in this software simulate the diffusion of gases through the foam and estimate thermal properties of the foam based on its morphology and composition of gases in the cells.

Installation

Install LAPACK and BLAS and VEUSZ

You can install them in Ubuntu using:

sudo apt-get install liblapack-dev libblas-dev veusz

Install fson library

The library is installed to {HOME}/lib and {HOME}/include

cd where-you-want-source-files
git clone https://github.com/japaf/fson.git
cd fson
cmake .
make
make install

### Compile the detailed models

./build

Running the simulations

  1. Prepare input file foamAging.json for aging simulation and/or foamConductivity.json for the prediction of heat insulation properties. Example input can be found in "examples" folder. The files must be located inside the inputs folder. More information about the inputs is provided in INPUTS.md.
  • Load all surrogate models and their parameters to database:
    ./initModels
    Note that foamConductivity takes initial points from init_foamConductivity.json. This file can be prepared using prep_init_foamConductivity.py.
  • The heat insulation properties can be predicted by running
    ./workflow_foamConductivity
    Input morphology and gas composition can be specified manually or taken from results of Bubble growth or 0D or 3D simulation. Note that running this script will delete the parameters of foamConductivity from the database. You should run initModels again before you run the aging simulation.
  • The evolution of heat insulation properties in time can be predicted by running
    ./workflow_foamAging
    Input morphology and gas composition can be specified manually or taken from results of Bubble growth or 0D or 3D simulation. Note that it is often advantageous to initialize the foamConductivity only for morphology, which would be used in the aging simulation. This can be achieved by running ./prep_init_foamConductivity.py 1, which will prepare initial points for the initialization based on input file for the aging simulation. However, note that foamConductivity will be re-fitted several times during the simulation, because the gas composition will change and the surrogate model will get out of range. If you don't want any re-fitting during the simulation, then run ./prep_init_foamConductivity.py 2, which will still use the foam morphology for the initialization of the foamConductivity, but also a whole range of possible gas compositions.

Results

The results can be found in the results folder. They can be visualized using python scripts and VEUSZ.