Colored diagram¶
Colored diagram of a function over a linear domain (set of 1D elments for example).
- class postprocess.xcVtk.diagrams.colored_diagram.ColoredDiagram(scaleFactor, fUnitConv, rgMinMax=None)¶
Bases:
postprocess.xcVtk.fields.vtk_lut_field.LUTField
- Colored diagram of a function over a linear domain (set of 1D
elements for example).
- Variables
scaleFactor – scale factor.
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 iqn red (defaults to None)
- addDiagramToScene(recordDisplay, orientation=1, title=None)¶
Adds the diagram to de scene
- Parameters
recordDisplay – DisplaySettings object.
orientation – orientation of the scalar bar (defaults to 1-horiz)
title – title for the scalar bar (defaults to None)
- appendDataFromElementEnds(dirVectors, elements, diagramIndex, valueCouples, defFScale=0.0)¶
Append to the diagram the data from the element ends as follows:
___—-* value2
- value1 *— |
1 +———-+ 2
- Parameters
dirVectors – direction vector for each element diagram.
elements – element over which diagram is represented.
diagramIndex – index-counter for the values to insert.
value1 – value at the start node.
value2 – value at the end node.
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)
- appendDataToDiagram(elements, diagramIndex, valueCouples, directions, defFScale=0.0)¶
Appends to the diagram the values being passed as parameter.
___—-* value2
- value1 *— |
1 +———-+ 2
- Parameters
elements – elements over which diagram is represented.
diagramIndex – index-counter for the values to insert.
valueCouples – (vStart, vEnd) couple of values at the start node and the end node of the element.
directions – direction of the diagram on each element.
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)
- createChangedSignDiagramInterval(offset, org, valOrg, dest, valDest, dirVector)¶
- Creates a diagram interval where the function to draw
changes its sign.
- Parameters
offset – Offset for the index of the values to insert.
org – Back end of the 1D element.
dest – Front end of the 1D element.
valOrg – Value of the field at the back end.
valDest – Value of the field at the front end.
dirVector – direction vector of the diagram.
- createConstantSignDiagramInterval(offset, org, valOrg, dest, valDest, dirVector)¶
- Creates a diagram interval where the function to draw
doesn’t changes its sign.
- Parameters
offset – Offset for the index of the values to insert.
org – Back end of the 1D element.
dest – Front end of the 1D element.
valOrg – Value of the field at the back end.
valDest – Value of the field at the front end.
dirVector – direction vector of the diagram.
- createDiagramActor()¶
- createDiagramDataStructure()¶
- createDiagramInterval(offset, org, valOrg, dest, valDest, dirVector)¶
Crea un tramo de diagrama.
- Parameters
offset – index-counter for the values to insert.
org – Extremo dorsal del elemento lineal.
dest – Extremo frontal del elemento lineal.
valOrg – Valor del campo escalar en el extremo dorsal.
valDest – Valor del campo escalar en el extremo frontal.
dirVector – direction vector of the diagram.
- filterValueCouples(valueCouples)¶
Removes the values outside the rgMinMax interval if any.
- Parameters
valueCouples – couple of values corresponding to each element.
- getDiagramIntervalRoot(org, valOrg, dest, valDest)¶
- Computes the position of the diagram root in the [org, dest]
interval.
- Parameters
org – Extremo dorsal del elemento lineal.
dest – Extremo frontal del elemento lineal.
valOrg – Valor del campo escalar en el extremo dorsal.
valDest – Valor del campo escalar en el extremo frontal.
- resetEstrucDatosDiagrama()¶
Diagram control variables¶
Display of diagrams (forces, moments, …) on linear elements
- class postprocess.xcVtk.diagrams.control_var_diagram.ControlVarDiagram(scaleFactor, fUnitConv, sets, attributeName, component, defaultDirection='J', rgMinMax=None, lRefModSize=1.0)¶
Bases:
postprocess.xcVtk.diagrams.colored_diagram.ColoredDiagram
Diagram of control var values (capacity factor values, internal forces values (N,My,Mz,T,Vy,Vz), crack width values,…
- Variables
sets – list of element sets for which the diagram will be displayed.
attributeName – name of the element’s property that has the control var in it for example as in elem.getProp(attributeName).component.
component – property to be displayed (possible arguments: ‘CF’, ‘N’, ‘My’, ‘Mz’, ‘wk’,…)
defaultDirection – default direction of the diagram (J: element local j vector or K: element local K vector).
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 iqn red (defaults to None)
lRefModSize – reference length of the model (how big the model is). Used to autoscale the diagram.
- addDiagram()¶
Add diagram to the scene.
- autoScale()¶
Autoscale the diagram.
- clear()¶
Clear the diagram data.
- computeDiagramValues()¶
Return the values needed to create the diagram representation.
- filterElements(propertyNames)¶
Return the elements that actually have the required properties.
- Parameters
propertyNames – names of the properties that contain the values to represent in the diagram.
- getElementComponentData(elem, propertyNames)¶
Return the data to be used to represent the diagram over the element
- Parameters
elem – element to get the components for.
propertyNames – names of the properties that contain the values to represent in the diagram.
- getMaxAbsComp()¶
Return the maximum absolute value of the component. It is used only for calculating auto-scale parameter, so we compare only values of the component in first node of the elements
- getPropertyNames()¶
Return the names of the properties used to construct the diagram.
Linear load diagram¶
Display of loads over linear elements.
- class postprocess.xcVtk.diagrams.linear_load_diagram.LinearLoadDiagram(setToDisp, scale, lRefModSize, fUnitConv, component, rgMinMax=None)¶
Bases:
postprocess.xcVtk.diagrams.load_diagram.LoadDiagram
Draw a load over a set of linear elements (qx,qy,qz,…)
- autoScale(preprocessor)¶
Autoscale the diagram.
- Parameters
preprocessor – pre-processor of the finite element problem.
- dumpElementalLoads(actLP, diagramIndex, defFScale=0.0)¶
Iterate over loaded elements dumping its loads into the graphic.
- Parameters
actLP – list of active load patterns.
diagramIndex – index-counter for the values to insert.
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).
- getMaxAbsComp(preprocessor)¶
Return the maximum absolute value of the component. It is used for calculating auto-scale parameter.
- Parameters
preprocessor – pre-processor of the finite element problem.
- sumElementalUniformLoads(actLP)¶
Iterate over active load patterns and cumulate on elements their elemental unifirm loads. Returns a dictionary that stores for each linear loaded element the sum of active loads on it
- Parameters
actLP – list of active load patterns.
Node property diagram¶
Diagram to display a property defined at nodes over linear elements.
- class postprocess.xcVtk.diagrams.node_property_diagram.NodePropertyDiagram(scaleFactor, lRefModSize, fUnitConv, sets, attributeName, defaultDirection='J', defaultValue=0.0, rgMinMax=None)¶
Bases:
postprocess.xcVtk.diagrams.property_diagram.PropertyDiagram
Diagram to display a property defined at nodes over linear elements.
- computeDiagramValues()¶
Return the values needed to create the diagram representation.
- getValueForNode(node)¶
Get the value of the property in the given node.
- Parameters
node – node to get the property from.
Element property diagram¶
Diagram display a property defined over linear elements.
- class postprocess.xcVtk.diagrams.element_property_diagram.ElementPropertyDiagram(scaleFactor, lRefModSize, fUnitConv, sets, propertyName, rgMinMax=None)¶
Bases:
postprocess.xcVtk.diagrams.property_diagram.PropertyDiagram
Diagram of element properties
- computeDiagramValues(eSet)¶
Return the values needed to create the diagram representation.
- envelopes = {'My+', 'My-', 'Mz+', 'Mz-', 'N+', 'N-', 'T+', 'T-', 'Vy+', 'Vy-', 'Vz+', 'Vz-'}¶
Internal force diagram¶
Display of diagrams (forces, moments, …) on linear elements
- class postprocess.xcVtk.diagrams.vtk_internal_force_diagram.InternalForceDiagram(scale, fUnitConv, sets, component, defaultDirection='J', rgMinMax=None)¶
Bases:
postprocess.xcVtk.diagrams.colored_diagram.ColoredDiagram
Diagram of internal forces (N,My,Mz,T,Vy,Vz)
- Variables
sets – list of element sets for which the diagram will be displayed.
component – property to be displayed (possible arguments: ‘N’, ‘My’, ‘Mz’Vz,…)
defaultDirection – default direction of the diagram (J: element local j vector or K: element local K vector).
- addDiagram()¶
- getElementComponentData(elem, silent=False)¶
Returns the data to use to represent the diagram over the element
- Parameters
elem – element to deal with.
component – component to represent:
silent – if true don’t complain about non-existent properties.