MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
FoamConstruction.run Namespace Reference

Python script, which organizes creation of the foam. More...

Functions

def porOpt (vx)
 Objective function. More...
 
def porfsOpt (x)
 Objective function. More...
 
def main ()
 Main function. More...
 

Variables

int dx = 1
 size of RVE
 
int dedge = 6
 initial guess for strut size
 
 data = json.load(data_file)
 Read input file. More...
 
string filenameBox = filename+"Box"
 foam in periodic box, binary format
 
string filenameBoxAscii = filenameBox+"-ascii"
 foam in periodic box, ascii format
 
string filenameBoxStruts = filenameBox+"Struts"
 foam in periodic box with struts
 
string filenameDescriptors = "descriptors.out"
 foam porosity and strut content
 
string filenameParameters = "parameters.out"
 current value of strut size
 
 term = Terminal()
 Creates terminal for colour output.
 

Detailed Description

Python script, which organizes creation of the foam.

Author
Pavel Ferkl

First, the geometric tessellation is performed so that the resulting foam has the correct bubble size distribution. Then several mesh conversions are made to obtain the foam image in desired format. Finally, foam is voxelized to desired foam density and struts are optionally added.

Function Documentation

◆ main()

def FoamConstruction.run.main ( )

Main function.

Executed when running the script from command line.

Definition at line 146 of file run.py.

References FoamConstruction.run.porOpt().

◆ porfsOpt()

def FoamConstruction.run.porfsOpt (   x)

Objective function.

For finding size of box, which would give desired porosity and strut content.

Parameters
[in]xBox size

Definition at line 82 of file run.py.

◆ porOpt()

def FoamConstruction.run.porOpt (   vx)

Objective function.

For finding size of box, which would give desired porosity.

Parameters
[in]vxBox size

Definition at line 55 of file run.py.

Referenced by FoamConstruction.run.main().

Variable Documentation

◆ data

FoamConstruction.run.data = json.load(data_file)

Read input file.

holds input variables

Definition at line 35 of file run.py.