fluidfoam.processing1d
Write, Read and Plot 1D input files for swak4foam
This module allows to read OpenFoam output of one dimensional computation and then write, plot and read input files for Boundary and Initial Conditions imposition in 3D computation (via swak4foam):
- fluidfoam.processing1d.create1dprofil(pathr, pathw, timename, axis, varlist)[source]
This function provides way to read 1D profiles at time timename of pathr and write them in OpenFoam Format in the 1d_profil folder of pathw (for BC imposition in 2D or 3D case for example).
- Args:
pathr: str
pathw: str
timename: str
axis: str
varlist: list of str
- Returns:
status: ‘create 1D profiles: done’ if ok
A way you might use me is:
status = fluidfoam.create1dprofil(“path_of_case”, “pathw”, time, ‘Y’, [‘Ua’, ‘Ub’])
Please note that the 1d_profil directory must be existing in the pathw directory
- fluidfoam.processing1d.read1dprofil(file_name)[source]
This function provides way to read and return 1D profil created by the create1dprofil function. file_name can be a complete path.
- Args:
filename: str
- Returns:
z: 1d mesh corresponding to 1d profil
field: scalar value of the field specified via filename
size1d: size of the 1d profil
A way you might use me is:
z, a, size1d = fluidfoam.read1dprofil(“path_of_case/1d_profil/a.xy”)
- fluidfoam.processing1d.plot1dprofil(pathr, varlist)[source]
This function provides way to plot 1D profiles created by the create1dprofil function.
- Args:
pathr: str (must be the full path of the 1d_profil directory)
varlist: list of str
A way you might use me is:
fluidfoam.plot1dprofil(“path_of_case/1d_profil”, [‘Ua’, ‘Ub’, ‘alpha’])
Functions
|
This function provides way to read 1D profiles at time timename of pathr and write them in OpenFoam Format in the 1d_profil folder of pathw (for BC imposition in 2D or 3D case for example). |
|
This function provides way to read 1D profiles at time timename of pathr and write them in OpenFoam Format in the 1d_profil folder of pathw (for BC imposition in 2D or 3D case for example). |
|
This function provides way to write specific 1D profil (var array) in OpenFoam Format in the 1d_profil folder of pathw (for BC imposition in 2D or 3D case for example). |
|
This function provides way to plot 1D profiles created by the create1dprofil function. |
|
This function provides way to read and return 1D profil created by the create1dprofil function. |
|
This function provides way to read and return 1D profil created by the create1dprofilDFSEM function. |