An Engineer’s tasks is never a single input/output process. In most all problem solving situations, the engineer needs to use the tools available to “navigate the road” from problem statement to an end solution/conclusion. The exports from one tool are typically the input the next… from CAD to Grid Generation, from Grid Generation to Solver, etc. With EnSight’s flexible output capability, along with a little python knowledge, users can take the output from EnSight and construct the input/boundary condition deck for the next solver.
In this particular example, EnSight was used to analyze the results from a Discrete Element Model to visualize and analyze the forces on the surface of the DEM model. However, the next step in the engineer’s process is to take these forces and use them as a boundary condition for the particular stress solver, to resolve the deformations, stresses, and load paths as a result of these particles. Well, EnSight + Python can help here too.
Within EnSight, we read in the DEM solution, and interrogated the forces on the surface of the DEM model. We used EnSight’s capability to read in multiple models to read in a second case containing just the grid for the stress analysis. We used EnSight’s CaseMap function to map the forces from the DEM model onto the stress analysis grid. From here, we exported the stress analysis grid (and its new force values) out of EnSight to the EnSight Case Gold format. Here is where python comes in to help us out. We need to reformat this data into a form that the stress analysis package can interpret as boundary condition information. The following python code takes the EnSight Case Gold format geometry file, along with the exported Force Vector information and generated a new input deck containing the boundary condition information for the stress analysis solver. I’ve tried to keep the code simple enough so that you can edit and customize this for your particular data, solver, and situation.
Convert Export to Boundary Condition. (remember you can run this python outside of EnSight by typing : cpython22 conv_bcs.py
EnSight Version 9.2.2; 10.0