Fields

Graphic representation of fields over the mesh.

class postprocess.xcVtk.FE_model.Fields.ExtrapolatedProperty(name, functionName, xcSet, component=None, fUnitConv=1.0, rgMinMax=None)

Bases: postprocess.xcVtk.FE_model.Fields.ExtrapolatedScalarField

Scalar field defined as property value at nodes.

display(defDisplay, fName=None, caption='', defFScale=0.0)
extrapolate()
plot(defDisplay, fName=None, caption='')
class postprocess.xcVtk.FE_model.Fields.ExtrapolatedScalarField(name, functionName, xcSet, component=None, fUnitConv=1.0, rgMinMax=None)

Bases: postprocess.xcVtk.FE_model.Fields.ScalarField

Scalar field defined at nodes. :ivar rgMinMax: range (vmin,vmax) with the maximum and minimum values

of the scalar field (if any) to be represented. All the values less than vmin are displayed in blue and those greater than vmax in red (defaults to None)
display(defDisplay, fName=None, caption='', defFScale=0.0)
plot(defDisplay, fName=None, caption='', defFScale=0.0)
class postprocess.xcVtk.FE_model.Fields.ScalarField(name, functionName, component=None, fUnitConv=1.0, rgMinMax=None)

Bases: postprocess.xcVtk.field_base.FieldBase

Scalar field defined at nodes.

Variables:rgMinMax – range (vmin,vmax) with the maximum and minimum values of the field to be represented. All the values less than vmin are displayed in blue and those greater than vmax in red (defaults to None)
fillArray(nodeSet)

Creates an vtkDoubleArray filled with the proper values.

setupOnGrid(uGrid)
setupOnMapper(gridMapper)
postprocess.xcVtk.FE_model.Fields.getScalarFieldFromControlVar(attributeName, argument, xcSet, component, fUnitConv, rgMinMax)
return an scalar field that represents the control var over the
elements in the set.
Parameters:
  • attributeName – name of the element’s property that has the control var in it for example as in elem.getProp(attributeName).eval(argument).
  • argument – name of the control var to represent.
  • xcSet – represent the field over those elements.
  • component – component of the control var to represent.
  • fUnitConv – unit conversion factor (i.e N->kN => fUnitConv= 1e-3).

quick_graphics

class postprocess.xcVtk.FE_model.quick_graphics.QuickGraphics(feProblem)

Bases: object

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:
  • 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’
dispLoadCaseBeamEl(loadCaseName='', setToDisplay=None, fUnitConv=1.0, elLoadComp='transComponent', elLoadScaleF=1.0, nodLoadScaleF=1.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None, defFScale=0.0)

Display the loads applied on beam elements and nodes for a given load case

Parameters:
  • setToDisplay – set of beam elements to be represented
  • fUnitConv – factor of conversion to be applied to the results (defaults to 1)
  • elLoadComp

    component of the loads on elements to be depicted [possible components: ‘axialComponent’, ‘transComponent’,

    ’transYComponent’, ‘transZComponent’]
  • elLoadScaleF – factor of scale to apply to the diagram display of element loads (defaults to 1)
  • nodLoadScaleF – factor of scale to apply to the vector display of nodal loads (defaults to 1)
  • vwDef – camera parameters.
  • caption – caption for the graphic
  • fileName – name of the file to plot the graphic. Defaults to None, in that case an screen display is generated
  • 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)
displayDispRot(itemToDisp='', setToDisplay=None, fConvUnits=1.0, unitDescription='', viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, fileName=None, defFScale=0.0, rgMinMax=None)

displays the component of the displacement or rotations in the set of entities.

Parameters:
  • itemToDisp – component of the displacement (‘uX’, ‘uY’ or ‘uZ’) or the rotation (‘rotX’, rotY’, ‘rotZ’) to be depicted
  • setToDisplay – set of entities to be represented (defaults to all entities)
  • fConvUnits – factor of conversion to be applied to the results (defaults to 1)
  • unitDescription – string describing units like ‘[mm] or [cm]’
  • fileName – name of the file to plot the graphic. Defaults to None, in that case an screen display is generated
  • 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)
  • rgMinMax – range (vmin,vmax) with the maximum and minimum values of the field to be represented. All the values less than vmin are displayed in blue and those greater than vmax in red (defaults to None)
displayIntForc(itemToDisp='', setToDisplay=None, fConvUnits=1.0, unitDescription='', viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, fileName=None, defFScale=0.0)

displays the component of internal forces in the set of entities as a scalar field (i.e. appropiated for 2D elements; shells…).

Parameters:
  • itemToDisp – component of the internal forces (‘N1’, ‘N2’, ‘N12’, ‘M1’, ‘M2’, ‘M12’, ‘Q1’, ‘Q2’) to be depicted
  • setToDisplay – set of entities to be represented (default to all entities)
  • fConvUnits – factor of conversion to be applied to the results (defalts to 1)
  • unitDescription – string like ‘[kN/m] or [kN m/m]’
  • viewDef – camera parameters.
  • fileName – name of the file to plot the graphic. Defaults to None, in that case an screen display is generated
  • 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)
displayIntForcDiag(itemToDisp='', setToDisplay=None, fConvUnits=1.0, scaleFactor=1.0, unitDescription='', viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, fileName=None, defFScale=0.0)
displays the component of internal forces in the set of entities as a
diagram over lines (i.e. appropiated for beam elements).
Parameters:
  • itemToDisp – component of the internal forces (‘N’, ‘Qy’ (or ‘Vy’), ‘Qz’ (or ‘Vz’), ‘My’, ‘Mz’, ‘T’) to be depicted
  • setToDisplay – set of entities (elements of type beam) to be represented
  • fConvUnits – factor of conversion to be applied to the results (defaults to 1)
  • scaleFactor – factor of scale to apply to the diagram display
  • unitDescription – string like ‘[kN/m] or [kN m/m]’
  • vwDef – camera parameters.
  • fileName – name of the file to plot the graphic. Defaults to None, in that case an screen display is generated
  • 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)
displayNodeValueDiagram(itemToDisp='', setToDisplay=None, fConvUnits=1.0, scaleFactor=1.0, unitDescription='', viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, fileName=None, defFScale=0.0)

displays the a displacement (uX,uY,…) or a property defined in nodes as a diagram over lines (i.e. appropiated for beam elements).

Parameters:
  • itemToDisp – item to display.
  • setToDisplay – set of entities (elements of type beam) to be represented
  • fConvUnits – factor of conversion to be applied to the results (defalts to 1)
  • scaleFactor – factor of scale to apply to the diagram display of
  • unitDescription – string like ‘[m]’ or ‘[rad]’ or ‘[m/s2]’
  • viewDef – camera parameters.
  • fileName – name of the file to plot the graphic. Defaults to None, in that case an screen display is generated
  • 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)
getDispComponentFromName(compName)
getDisplay(wmDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>)

Returns a suitable display to show the graphics.

Parameters:vwDef – camera parameters.
getIntForceComponentFromName(componentName)
solve(loadCaseName, loadCaseExpr='')
postprocess.xcVtk.FE_model.quick_graphics.display_axes(vectorField, preprocessor, setToDisplay=None, vectorScale=1.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None, defFScale=0.0)

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

Parameters:
  • vectorField – function that generates the vector field.
  • setToDisplay – set of elements to be displayed (defaults to total set)
  • vectorScale – factor to apply to the vectors length in the representation.
  • viewDef – camera parameters.
  • fileName – full name of the graphic file to generate. Defaults to None, in this case it returns a console output graphic.
  • caption – text to display in the graphic
  • 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)
postprocess.xcVtk.FE_model.quick_graphics.display_beam_result(attributeName, itemToDisp, beamSetDispRes, setToDisplay=None, fConvUnits=1.0, scaleFactor=1.0, caption=None, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, fileName=None, defFScale=0.0)

display results for beam elements from a limit state verification file.

:param attributeName:attribute name(e.g. ‘ULS_normalStressesResistance’) :param itemToDisp: result item to display (e.g. ‘N’, ‘My’, …) :param beamSetDispRes:set of linear elements to which display results :param setToDisplay: set of elements (any type) to be depicted

(defaults to None, in that case only elements in beamSetDispRes are displayed)
Parameters:
  • fConvUnits – factor of conversion to be applied to the results (defaults to 1)
  • scaleFactor – factor of scale to apply to the auto-scaled display (defaults to 1)
  • caption – caption to display (defaults to ‘attributeName + itemToDisp’)
  • viewDef – instance of class CameraParameters (defaults to ‘XYZPos’)
  • fileName – file to dump the display (defaults to screen display)
  • 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)
postprocess.xcVtk.FE_model.quick_graphics.display_diagram(scaleFactor, fConvUnits, setToDispRes, setDisp, attributeName, component, caption, viewDef, defFScale, fileName)

Auxiliary function to display results on linear elements.

Parameters:
  • scaleFactor – factor of scale to apply to the diagram display
  • fConvUnits – factor of conversion to be applied to the results
  • setToDispRes – set of linear elements to which display results
  • setDisp – set of elements (any type) to be depicted

:param attributeName:attribute name(e.g. ‘ULS_normalStressesResistance’) :param component: result item to display (e.g. ‘N’, ‘My’, …) :param caption: caption to display :param viewDef: instance of class CameraParameters :param 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)
Parameters:fileName – file to dump the display
postprocess.xcVtk.FE_model.quick_graphics.display_eigen_result(preprocessor, eigenMode, setToDisplay=None, defShapeScale=0.0, equLoadVctScale=None, accelMode=None, unitsScale=1.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None)

Display the deformed shape and/or the equivalent static forces associated with the eigenvibration mode passed as parameter.

Parameters:
  • eigenMode – eigenvibration mode to be displayed
  • setToDisplay – set of elements to be displayed (defaults to total set)
  • defShapeScale – factor to apply to deformed shape so that the displayed position of each node equals to the initial position plus its eigenVector multiplied by this factor. (Defaults to 0.0, i.e. display of initial/undeformed shape)
  • equLoadVctScale – factor to apply to the vectors length in the representation of equivalent loads on nodes. If vectorEqLoadScale equals 0 or None, equivalent static loads are not represented. (defaults to None, in which case only deformed shape is depicted)
  • accelMode – acceleration associated with the eigen mode depicted, only used if the equivalent static loads are to be displayed.
  • unitsScale – factor to apply to the results if we want to change the unit system.
  • viewDef – camera parameters.
  • caption – text to display in the graphic
  • fileName – full name of the graphic file to generate. Defaults to ` None`, in this case it returns a console output graphic.
postprocess.xcVtk.FE_model.quick_graphics.display_load(preprocessor, setToDisplay=None, loadCaseNm='', unitsScale=1.0, vectorScale=1.0, multByElemArea=False, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None, defFScale=0.0)

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)
  • loadCaseNm – name of the load case to be depicted
  • unitsScale – factor to apply to the results if we want to change the unit system.
  • vectorScale – factor to apply to the vectors length in the representation
  • multByElemArea

    boolean value that must be True if we want to represent the total load on each element (=load multiplied by element area) and False if we are going to depict the value of

    the uniform load per unit area
  • viewDef – camera parameters.
  • fileName – full name of the graphic file to generate. Defaults to ` None`, in this case it returns a console output graphic.
  • caption – text to display in the graphic
  • 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)
postprocess.xcVtk.FE_model.quick_graphics.display_local_axes(prep, setToDisplay=None, vectorScale=1.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None, defFScale=0.0)

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)
  • vectorScale – factor to apply to the vectors length in the representation.
  • viewDef – camera parameters.
  • fileName – full name of the graphic file to generate. Defaults to None, in this case it returns a console output graphic.
  • caption – text to display in the graphic
  • 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)
postprocess.xcVtk.FE_model.quick_graphics.display_strong_weak_axis(preprocessor, setToDisplay=None, vectorScale=1.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, caption='', fileName=None, defFScale=0.0)
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)
  • vectorScale – factor to apply to the vectors length in the representation.
  • viewDef – camera parameters.
  • fileName – full name of the graphic file to generate. Defaults to None, in this case it returns a console output graphic.
  • caption – text to display in the graphic
  • 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)

vtk_define_mesh_cells_fe

postprocess.xcVtk.FE_model.vtk_define_mesh_cells_fe.VtkCargaIdsElem(nmbUGrid, setName)
postprocess.xcVtk.FE_model.vtk_define_mesh_cells_fe.VtkDibujaIdsElementos(nmbUGrid, setName, renderer)

vtk_define_mesh_nodes

postprocess.xcVtk.FE_model.vtk_define_mesh_nodes.VtkCargaIdsNodes(recordGrid)
postprocess.xcVtk.FE_model.vtk_define_mesh_nodes.VtkDibujaIdsNodes(recordGrid, renderer)

Display node labels

vtk_display_limit_state

Routines to display limit state results over the finite element mesh.

postprocess.xcVtk.FE_model.vtk_display_limit_state.displayFieldDirs1and2(limitStateLabel, argument, elementSet, component, fUnitConv, fileName, captionTexts, defFScale=0.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, rgMinMax=None)

Display a field defined over bi-dimensional elements in its two directions.

Parameters:
  • limitStateLabel – label that identifies the limit state.
  • argument – name of the control var to represent.
  • xcSet – represent the field over those elements with “genDescr” and “sectDescr” attributes.
  • component – component of the control var to represent.
  • fUnitConv – unit conversion factor (i.e N->kN => fUnitConv= 1e-3).
  • fileName – file name to store the image. If none -> window on screen.
  • captionTexts – dictionary of caption texts.
  • 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)
  • viewDef – camera parameters (position, orientation,…)
  • rgMinMax – range (vmin,vmax) with the maximum and minimum values of the scalar field (if any) to be represented. All the values less than vmin are displayed in blue and those greater than vmax in red (defaults to None)
postprocess.xcVtk.FE_model.vtk_display_limit_state.displayFieldDirs1and2Base(limitStateLabel, argument, elementSet, genDescr, sectDescr, component, fUnitConv, fileName, captionTexts, defFScale=0.0, viewDef=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, rgMinMax=None)

Display a field defined over bi-dimensional elements in its two directions.

Parameters:
  • limitStateLabel – label that identifies the limit state.
  • argument – name of the control var to represent.
  • xcSet – represent the field over those elements.
  • genDescr – text to identify the set (i.e ‘deck’ or ‘west wall’).
  • sectDescr – text list to identify each direction (as [‘vertical reinforcement’, ‘horizontal reinforcement’]).
  • component – component of the control var to represent.
  • fUnitConv – unit conversion factor (i.e N->kN => fUnitConv= 1e-3).
  • fileName – file name to store the image. If none -> window on screen.
  • captionTexts – dictionary of caption texts.
  • 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)
  • viewDef – camera parameters (position, orientation,…)
  • rgMinMax – range (vmin,vmax) with the maximum and minimum values of the scalar field (if any) to be represented. All the values less than vmin are displayed in blue and those greater than vmax in red (defaults to None)

vtk_FE_graphic

Graphics of the finite element model.

class postprocess.xcVtk.FE_model.vtk_FE_graphic.RecordDefDisplayEF

Bases: postprocess.xcVtk.vtk_graphic_base.RecordDefDisplay

Define the parameters to configure the output device.

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

Graphic of the FE mesh

Parameters:
  • xcSet – 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)
VtkDefineElementsActor(reprType, field, color=<xc.Vector object>)

Define the actor to display elements

Parameters:
  • reprType – type of representation (“points”, “wireframe” or “surface”)
  • field – field to be repreresented
  • color – RGB color to represent the elements (defaults to random color)
VtkDefineNodesActor(radius)

Define the actor to display nodes.

Parameters:radius – radius of the sphere used as symbol to represent nodes.
VtkLoadElemMesh(field, defFScale=0.0, eigenMode=None)

Load the element mesh

Parameters:
  • field – scalar field to be represented
  • 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. In case of modal analysis, the displayed position of each node equals to the initial position plus its eigenVector 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.
appendDiagram(diagram)
defineMeshActorsSet(elemSet, field, defFScale, nodeSize)
defineMeshScene(field, defFScale=0.0, eigenMode=None, color=<xc.Vector object>)

Define the scene for the mesh

Parameters:
  • field – scalar field to be represented
  • 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, pLoad, loadPattern, renderer, color, force, fScale)

Display punctual loads on elements

displayElementUniformLoad(preprocessor, unifLoad, loadPattern, color, force, fScale)
displayElementalLoads(preprocessor, loadPattern, color, fScale)
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 double 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(xcSet, caption='', cameraParameters=<postprocess.xcVtk.vtk_graphic_base.CameraParameters object>, vectorScale=1.0)

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

Parameters:
  • xcSet – set of elements to be displayed (defaults to total set)
  • caption – text to display in the graphic
  • cameraParameters – camera parameters (position, orientation,…).
  • vectorScale – factor to apply to the vectors length in the representation
displayMesh(xcSets, field=None, diagrams=None, fName=None, caption='', 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)
  • fName – name of the graphic file to create (if None -> screen window).
  • caption – text to display in the graphic.
  • 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 points 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
  • 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)
displaySPconstraints(xcSet, scale)
displayScalarField(preprocessor, xcSet, field, fName=None)

vtk_load_elem

postprocess.xcVtk.FE_model.vtk_load_elem.VtkLoadElementos(setName)

vtk_load_nodes

postprocess.xcVtk.FE_model.vtk_load_nodes.VtkLoadNodes(setName, nmbContndr)

vtk_plot_element_ids

postprocess.xcVtk.FE_model.vtk_plot_element_ids.VtkDibujaIdsElementos(ids)

vtk_plot_elements

postprocess.xcVtk.FE_model.vtk_plot_elements.VtkDibujaElementos1D(nmbActor)

vtk_plot_nodes

postprocess.xcVtk.FE_model.vtk_plot_nodes.VtkDibujaNodes(nmbActor)