Utils¶
-
casingSimulations.utils.
ccv3DthetaSlice
(mesh3D, v3D, theta_ind=0)¶ Grab a theta slice through a 3D field defined at cell centers
Parameters: - mesh3D (discretize.CylMesh) – 3D cyl mesh
- v3D (numpy.ndarray) – vector of fields on mesh
- theta_ind (int) – index of the theta slice that you want
-
casingSimulations.utils.
edge3DthetaSlice
(mesh3D, h3D, theta_ind=0)¶ Grab a theta slice through a 3D field defined on edges (y component), consistent with what would be found from a 2D simulation
Parameters: - mesh3D (discretize.CylMesh) – 3D cyl mesh
- h3D (numpy.ndarray) – vector of fields on mesh
- theta_ind (int) – index of the theta slice that you want
-
casingSimulations.utils.
face3DthetaSlice
(mesh3D, j3D, theta_ind=0)¶ Grab a theta slice through a 3D field defined on faces (x, z components), consistent with what would be found from a 2D simulation
Parameters: - mesh3D (discretize.CylMesh) – 3D cyl mesh
- j3D (numpy.ndarray) – vector of fluxes on mesh
- theta_ind (int) – index of the theta slice that you want
-
casingSimulations.utils.
loadSimulationResults
(directory='.', simulationParameters='simulationParameters.json', fields='fields.npy', meshGenerator=None)¶
-
casingSimulations.utils.
load_properties
(filename)¶ Open a json file and load the properties into the target class
As long as there are no namespace conflicts, the target __class__ will be stored on the properties.HasProperties registry and may be fetched from there.
Parameters: filename (str) – name of file to read in
-
casingSimulations.utils.
writeSimulationPy
(modelParameters='ModelParameters.json', meshGenerator='MeshParameters.json', src='Source.json', physics='FDEM', fields_filename='fields.npy', directory='.', simulation_filename='simulation.py', includeDC=True, include2D=True)¶