MoDeNa
1.0
Software framework facilitating sequential multi-scale modelling
|
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. | |
Python script, which organizes creation of the foam.
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.
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().
def FoamConstruction.run.porfsOpt | ( | x | ) |
def FoamConstruction.run.porOpt | ( | vx | ) |
Objective function.
For finding size of box, which would give desired porosity.
[in] | vx | Box size |
Definition at line 55 of file run.py.
Referenced by FoamConstruction.run.main().