Quick graphics

Provide the user with a quick and easy way to display results (internal forces, displacements) of an user-defined load case.

class postprocess.xcVtk.FE_model.quick_graphics.LoadCaseResults(feProblem, loadCaseName='', loadCaseExpr='', outputStyle=<postprocess.output_styles.OutputStyle object>)

Bases: postprocess.xcVtk.FE_model.quick_graphics.QuickGraphics

This class is aimed at providing the user with a quick and easy way to display results (internal forces, displacements) of an user-defined load case.

Variables
  • feProblem – finite element problem

  • loadCaseName – name of the load case to be created

  • loadCaseExpr – expression that defines de load case as a combination of previously defined actions e.g. ‘1.0*GselfWeight+1.0*GearthPress’

checkSetToDisp(setToDisplay)
solve()
class postprocess.xcVtk.FE_model.quick_graphics.QuickGraphics(modelSpace=None, loadCaseName='', loadCaseExpr='', outputStyle=<postprocess.output_styles.OutputStyle object>)

Bases: postprocess.output_handler.OutputHandler

This class is aimed at providing the user with a quick and easy way to display results (internal forces, displacements).

Variables
  • loadCaseName – OPTIONAL. name of the load case to be created

  • loadCaseExpr – OPTIONAL. expression that defines de load case as a combination of previously defined actions e.g. ‘1.0*GselfWeight+1.0*GearthPress’

vtk FE model graphics

Graphics of the finite element model.

class postprocess.xcVtk.FE_model.vtk_FE_graphic.DisplaySettingsFE

Bases: postprocess.xcVtk.vtk_graphic_base.DisplaySettings

Define the parameters to configure the output for

displaying the finite element mesh.

Variables
  • nodes – 3D representation of points in VTK.

  • gridMapper – VTK unstructured grid used to represent the FE mesh.

  • field – scalar field to be represented.

FEmeshGraphic(setToDisplay, caption='', cameraParameters=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, defFScale=0.0)

Graphic of the FE mesh

Parameters
  • setToDisplay – XC set of elements to be displayed

  • caption – text to write in the graphic

  • cameraParameters – camera parameters (position, orientation,…).

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

appendDiagram(diagram, orientScbar=1, titleScbar=None)

Add the diagrams to the actors to display.

Parameters
  • diagram – diagram to append.

  • orientScbar – orientation of the scalar bar (defaults to 1-horiz)

  • titleScbar – title for the scalar bar (defaults to None)

defineMeshScene(defFScale=0.0, eigenMode=None, color=<xc.Vector object>)

Define the scene for the mesh

Parameters
  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

  • eigenMode – eigenvibration mode if we want to display the deformed shape associated with it when a modal analysis has been carried out. Defaults to None: no modal analysis.

  • color – RGB color to represent the elements (defaults to random color)

displayConstraints(setToDisplay, scale, defFScale=0.0)

Display single point constraints.

Parameters
  • setToDisplay – set to be displayed

  • scale – scale for SPConstraints symbols.

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

displayElementPunctualLoad(preprocessor, loadedElements, renderer, color, force, fScale)

Display punctual loads on elements

Parameters
  • preprocessor – pre-processor of the finite element problem.

  • loadedElements – punctual load to display (as a single arrow).

  • renderer – vtk renderer.

  • color – color

  • force – force to displaay (as a single arrow)

  • fScale – scaling factor (applied to displayed arrows)

displayElementUniformLoad(preprocessor, unifLoad, color, force, fScale)
displayElementalLoads(preprocessor, loadPattern, color, fScale)
displayFEMesh(setToDisplay, caption='', fileName=None, defFScale=0.0)

Graphic of the FE mesh

Parameters
  • setToDisplay – XC set of elements to be displayed.

  • caption – text title to write in the graphic.

  • fileName – file name to store the image. If none -> window on screen.

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

displayLoadOnNode(nod, color, force, moment, fScale, defFScale=0.0)

Display loads on one node

Parameters
  • nod – node instance

  • color – color

  • force – force (displayed as a single arrow)

  • moment – moment (displayed as a torque arrow)

  • fScale – scaling factor (forces and moments)

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

displayLoads(preprocessor, loadPattern)
displayLocalAxes(setToDisplay, caption='local axis', vectorScale=1.0, fileName=None, defFScale=0.0)

Display the element local axes.

Parameters
  • setToDisplay – set of elements to be displayed (defaults to total set)

  • caption – text to display in the graphic

  • vectorScale – factor to apply to the vectors length in the representation

  • fileName – file name to store the image. If none -> window on screen.

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

displayMesh(xcSets, field: Optional[postprocess.xcVtk.fields.fields.ScalarField] = None, diagrams=None, caption='', unitDescription='', fileName=None, defFScale=0.0, nodeSize=0.01, scaleConstr=0.2)

Display the finite element mesh

Parameters
  • xcSets – set or list of sets to be displayed

  • field – scalar field to show (optional)

  • diagrams – diagrams to show (optional)

  • caption – text to display in the graphic.

  • unitDescription – description of the units.

  • fileName – name of the graphic file to create (if None -> screen window).

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

  • nodeSize – size of the spheres that represent nodes (defaults to 0.01)

  • scaleConstr – scale of SPConstraints symbols (defaults to 0.2)

displayNodalLoads(preprocessor, loadPattern, color, fScale)

Display the all nodal loads defined in a load pattern

Parameters
  • preprocessor – preprocessor for the FE problem.

  • loadPattern – load pattern

  • color – color of the symbols (arrows)

  • fScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

displayStrongWeakAxis(setToDisplay, caption='strong [red] and weak [blue] axes', vectorScale=1.0, fileName=None)

vector field display of the loads applied to the chosen set of elements in the load case passed as parameter

Parameters
  • setToDisplay – set of elements to be displayed (defaults to total set)

  • caption – text to display in the graphic

  • vectorScale – factor to apply to the vectors length in the representation

  • fileName – file name to store the image. If none -> window on screen.

getSingleFreedomConstraintsData(preprocessor, nodsInSet)
Return the data to define the symbols of the single-fredom

boundary conditions.

Parameters
  • preprocessor – preprocessor for the FE problem.

  • nodsInSet – set of node tags whose constrains will be displayed.

getSkewConstraintsData(preprocessor, nodsInSet, defFScale)
Return the data to define the symbols of the skew

boundary conditions.

Parameters
  • preprocessor – preprocessor for the FE problem.

  • nodsInSet – set of node tags whose constrains will be displayed.

  • defFScale – factor to apply to current displacement of nodes so that the display position of each node equals to the initial position plus its displacement multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)

setField(field)

Assigns the field to be represented.

Parameters

field – scalar field to be represented

postprocess.xcVtk.FE_model.vtk_FE_graphic.VtkDisplayIdsElements(ids)

Display element labels. Not implemented yet.

postprocess.xcVtk.FE_model.vtk_FE_graphic.VtkDisplayIdsNodes(recordGrid, renderer)

Display node labels (not implemented yet)

postprocess.xcVtk.FE_model.vtk_FE_graphic.VtkLoadIdsNodes(recordGrid)

Load node labels. Not yet implemented.