Predefined spaces

Classes and functions to facilitate the building of the model.

model.predefined_spaces.ConstraintsForLineExtremeNodes(lineSet, constraint)

Apply constraint on the extreme nodes of a model line.

model.predefined_spaces.ConstraintsForLineInteriorNodes(lineSet, constraint)

Apply constraint on the interior nodes of a model line.

class model.predefined_spaces.PredefinedSpace(nodes, dimSpace, numDOFs, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: object

Convenience class that sets the space dimension and

the number of degrees of freedom for a XC finite element problem.

Variables
  • dimSpace – dimension of the space (1, 2 or 3).

  • numDOFs – number of degrees of freedom for each node (1, 2, 3 or 6).

  • solProcType – type of the solution procedure.

  • fixedNodesTags – tags of the constrained nodes.

  • createdNodeLockersNames – list containing the names of the node lockers created by the methods that activate/deactivate a set of elements.

  • dBase – current database.

activateElements(elemSet: xc.Set)

Activate the (previoulsy deactivated) elements on the set argument.

Parameters

elemSet – set of elements to be deactivated.

addCombinationForNonLinearAnalysis(loadCaseExpression: str)
Adds a load combination to the domain and sets the partial

safety factors obtained from the expresion.

Parameters

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

addLoadCaseToDomain(loadCaseName: str)
Add the load case argument (load pattern or combination) to

the domain.

Parameters

loadCaseName – name of the load pattern or combination.

addNewLoadCaseToDomain(loadCaseName: str, loadCaseExpression: str, force=False)

Defines a new combination and add it to the domain.

Parameters
  • loadCaseName – name of the load pattern or combination.

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

  • force – if true, force redefinition of the load combination even if it exists.

analyze(numSteps=1, calculateNodalReactions=False, includeInertia=False, reactionCheckTolerance=1e-07)
Triggers the analysis of the model with a simple static linear

solution.

Parameters
  • numSteps – number of analysis steps (only useful for loads that vary with time).

  • calculateNodalReactions – if true calculate reactions at nodes.

  • includeInertia – if true calculate reactions including inertia effects.

  • reactionCheckTolerance – tolerance when checking reaction values.

calculateNodalReactions(includeInertia=False, reactionCheckTolerance=1e-07)

Compute reactions at nodes. :param includeInertia: if true calculate reactions including inertia

effects.

Parameters

reactionCheckTolerance – tolerance when checking reaction values.

checkFloatingNodes(xcSet=None)

Print an error message if the model has floating nodes.

Parameters

xcSet – search only on the nodes in this set.

classifyBlockTopologyObjects(setsFromLabels, xcSet=None)
Insert each block topology object (point, line, surface, volume)

in one or more set according to the value of its “Labels” property.

Parameters
  • setsFromLabels – Python list containing the (regex, set) pairs defining the classification. The first value of the pair is a regular expression to be matched against the object labels, the second value is the set that will receive the object if the regular expression matches.

  • xcSet – set containing the objects to classify (defaults to the total set).

clearAll()

Clear the finite element model.

clearCombinationsFromLoadHandler()

Remove the combinations currently defined in the load handler.

commit()

Commit the current state.

computeValuesAtNodes(setToCompute: xc.Set, propToDefine='stress', transformToLocalCoord=False)
Extrapolate the required values to the nodes of the set argument and

stores them in the property “propToDefine”.

Parameters
  • setToCompute – set of elements to be processed.

  • propToDefine – name of the property to define at the nodes.

  • transformToLocalCoord – if true (and appropriate), express the obtained result in local coordinates.

conciliaNDivs()

Conciliate the number of divisions of the lines.

copyElementalLoads(fromElement, toElement)

Copy the nodal loads acting on the first element to the second one.

Parameters
  • fromElement – element to copy the loads from.

  • toElement – element to copy the loads to.

copyNodalLoads(fromNode, toNode)

Copy the nodal loads acting on the first node to the second one.

Parameters
  • fromNode – node to copy the loads from.

  • toNode – node to copy the loads to.

createSelfWeightLoad(xcSet: xc.Set, gravityVector, alreadyLoaded=None)
Creates the self-weight load on the elements. Return the

identifiers of the loaded elements.

Parameters
  • xcSet – set with the elements to load.

  • gravityVector – gravity acceleration vector.

deactivateElements(elemSet: xc.Set, srf=1e-06, freezeDeadNodes=True)

Deactivate the elements on the set argument.

Parameters
  • elemSet – set of elements to be deactivated.

  • srf – stress reduction factor for element deactivation.

defSet(setName: Optional[str] = None, nodes=None, elements=None, points=None, lines=None, surfaces=None, bodies=None)

Defines a set with the name argument.

Parameters
  • setName – name of the set to define.

  • nodes – node iterable to initizalize the nodes of the set.

  • element – element iterable to initizalize the elements of the set.

  • points – point iterable to initizalize the points of the set.

  • lines – line iterable to initizalize the lines of the set.

  • surfaces – surface iterable to initizalize the surfaces of the set.

  • bodies – body iterable to initizalize the bodies of the set.

displayLoads(oh, loadCasesToDisplay, setsToDisplay=None, elLoadComp='xyzComponents', fUnitConv=1, caption=None, fileName=None, defFScale=0.0, scaleConstr=0.2)

Display the loads.

Parameters
  • oh – output handler to use as display engine.

  • loadCasesToDisplay – load cases that will be displayed.

  • setsToDisplay – element sets to display the loads on.

  • elLoadComp – component of the elemental loads to be depicted [available components: ‘xyzComponents’ (default), ‘axialComponent’, ‘transComponent’, ‘transYComponent’, ‘transZComponent’, ‘epsilon_xx’, ‘epsilon_yy’, ‘epsilon_zz’, ‘epsilon_xy’, ‘epsilon_xz’, ‘epsilon_yz’]

  • fUnitConv – factor of conversion to be applied to the results (defaults to 1)

  • 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)

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

displayReactions(oh, setsToDisplay=None, loadCasesToDisplay=None, combContainer=None, echo=False, fileName=None, defFScale=0.0, inclInertia=False, reactionCheckTolerance=1e-07)

Display the loads.

Parameters
  • oh – output handler to use as display engine.

  • model – finite element model to display the loads on.

  • setsToDisplay – element sets to display the loads on.

  • loadCasesToDisplay – load cases whose reaction will be displayed.

  • combContainer – load combinations whose reaction will be displayed.

  • 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)

  • inclInertia – include inertia effects (defaults to false).

  • reactionCheckTolerance – relative tolerance when checking reaction values.

dumpCombinations(combContainer)

Dump combination definitions into XC.

Parameters

combContainer – combination container (see combinations module).

duplicateNode(node)

Duplicate the given node.

fixNode(DOFpattern, nodeTag, restrainedNodeId: Optional[str] = None)

Restrain DOF of a node according to the DOFpattern, which is a given string of type ‘0FF’ that matches the DOFs (uX,uY,uZ) where ‘F’ means FREE and ‘0’ means constrained with value=0 Note: DOFpaterns ‘0FF’,’0_FF’, … are equivalent

Parameters
  • DOFpattern – sequence of ‘0’ (fixed) and ‘F’ (free) characters expressing the constraint for the corresponding DOF.

  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

getActiveLoadPatternNames()

Return a list of the active load patterns.

getActiveLoadPatterns()

Return a list of the active load patterns.

getBnd()

Return the boundary of the model.

getCommittedTime()

Return the value of the committed pseudo-time.

getCreepDt()

get the creep gime increment for TD concrete materials.

getCurrentLoadCaseName()

Return the name of the current combination (if any).

getCurrentLoadPattern()

Return the current load pattern.

getCurrentLoadPatternName()

Return the current load pattern.

getCurrentTime()

Return the value of the current pseudo-time.

getDefaultMaterials()

Return the default materials for the element handler and the seed element handler.

getDisplacementFileHeader()

Return the string header for the file with the displacements.

getEigenvectorsMaxNormInf(mode)
Return the maximum value of the infinity norm for the eigenvectors

computed for the given node at each mode.

Parameters

mode – eingenmode.

getElementHandler()

Return the element handler for this model.

getElements(tags: Sequence[int])
Return the elements that correspond to the argument

tags.

Parameters

tags – element tags.

getFloatingNodes(xcSet=None)
Return a list of the nodes that are not connected to any

element nor any constraint.

Parameters

xcSet – search only on the nodes in this set.

getLineHandler()

Return the line handler for this model.

getLineWithEndPoints(pA: xc.Pnt, pB: xc.Pnt)

Return the line from its endpoints.

Parameters
  • pA – from point.

  • pB – to point.

getLoadCaseNamed(loadCaseName: str)
Return the load case argument (load pattern or combination) whose

name is passed as parameter.

Parameters

loadCaseName – name of the load pattern or combination.

getLoadCombinationsHandler()

Return the preprocessor load combinations handler.

getLoadHandler()

Return the preprocessor load handler.

getLoadPattern(lpName: str)

Return the load pattern with the argument name.

Parameters

lpName – load pattern name.

getLoadPatternsActingOnElement(e)

Return the load patterns that act on the given element.

Parameters

e – element to search load patterns acting on.

getLoadPatternsActingOnNode(n)

Return the load patterns that act on the given node.

Parameters

n – node to search load patterns acting on.

getMaterialFromName(name)

Return the material which has the given name.

Parameters

tag – name of the desired material.

getMaterialFromTag(tag)

Return the material which has the given tag.

Parameters

tag – tag of the desired material.

getMaterialHandler()

Return the preprocessor material handler.

getMaterialNames()

Return the names of the materials.

getNDivErrorsTags()

Return the identifies of the lines that have an incomptible number of divisions.

getNearestPoint(pos3d)

Return the nearest point to the position argument.

getNewDatabase(fName, dbType='BerkeleyDB')

Defines a new database.

Parameters
  • fName – file name.

  • dbType – database type (defaults as BerkeleyDB).

getNodeHandler()

Return the node handler for this model.

getNodes(tags: Sequence[int])
Return the nodes that correspond to the argument

tags.

Parameters

tags – node tags.

getNumberOfElements()

Return the number of elements.

getNumberOfNodes()

Return the number of elements.

getPointHandler()

Return the point handler for this model.

getProblem()

Return the XC finite element problem object.

getReactions(xcSet=None, tol=0.001)
Return a Reactions object containing the reactions

obtained during the analysis.

Parameters

xcSet – compute only the reactions of the nodes in the set.

getSeedElementHandler()

Return the seed element handler for this model.

getSet(setName: str)

Return the set with the name argument.

Parameters

setName – name of the set to retrieve.

getSetsContainingElement(element)

Return the sets that contain the given element.

Parameters

element – element that is contained by the returned sets.

getSetsContainingNode(node)

Return the sets that contain the given node.

Parameters

node – node that is contained by the returned sets.

getSetsNames()

Returns the names of the currently defined sets.

getShellIntForceComponentLabelFromName(componentName: str, responseId=None)
Return the shell internal force component label from the given

beam internal force compoenent label.

Parameters
  • componentName – name of the component.

  • responseId – response identifiers of the material.

getSpaceDimension()

Return the dimensions of the problem space.

getStateComponentIndexFromName(compName: str)

Return the component index from the state component name (defined in DruckerPrager.cpp).

Parameters

compName – state component name.

getSurfaceHandler()

Return the surface handler for this model.

getTotalSet()

Return the set that contains all the defined entities.

getTransfCooHandler()

Return the coordinate transformation handler.

getValuesAtNodes(element, code: str, silent=False)

Return the values corresponding to code at each of the element nodes.

Parameters
  • element – element which the stresses at its nodes will be retrieved.

  • code – magnitude to return (stress, strain,…).

  • silent – if true don’t complain about non-existent properties.

getVerbosityLevel()

Return the current verbosity level.. A higher verbosity level means more info printed out.

glueNodeToElement(nodeTag: int, elemTag: int, gluedDOFs: xc.ID)

Create a constraint that glues the given node to the given element.

Parameters
  • nodeTag – tag of the node.

  • elemTag – tag of the element.

  • gluedDofs – degrees of freedom to be glued (e.g.: dofs=xc.ID([0,2,5]) means to equal ux,uz,rotz)

illConditioningAnalysis(numModes=1)

Perform an ill-conditioning analysis on the finite element model.

Parameters

numModes – number of ill-conditioned modes to obtain.

importFromFreeCAD(fileName, groupsToImport, getRelativeCoo, threshold=0.01, importLines=True, importSurfaces=True)

Constructor.

Parameters
  • fileName – file name to import.

  • groupsToImport – list of regular expressions to be tested.

  • getRelativeCoo – coordinate transformation to be applied to the points.

  • importLines – if true import lines.

  • importSurfaces – if true import surfaces.

locateEquationNumber(eqNumber, xcSet=None)
Locate the node that contains the DOF that correspond to

the equation number argument.

Parameters
  • eqNumber – number of the equation to locate.

  • xcSet – search only on the nodes in this set.

meshIFCStructuralSurfaces(elementType: str, elemSize: float, materialDict, xcSet=None)

Generate the finite element mesh for the surfaces of the set. The surfaces are imported from an IFC file.

Parameters
  • elementType – element type (ShellMIC4,…).

  • elemSize – element size.

  • materialDict – material dictionary.

  • xcSet – set containing the surfaces to mesh.

newAntiSymmetryConstraint(nodeTag: int, plane)
Prescribe a anti-symmetry boundary condition displacement

for the given node.

Parameters
  • nodeTag – tag of the node.

  • plane – plane (in the case of 3D problems) or line (in the case of 2D problems) that defines the symmetry.

newElement(elementType: str, nodeTags)

Create a new element.

Parameters
  • elementType – type of the new element (i.e.. ‘ShellMITC4’ or ‘ZeroLength’).

  • nodeTags – list of the identifiers of the element nodes.

newEqualDOF(nodeTagA: int, nodeTagB: int, dofs: xc.ID)

Create an equal DOF constraint between the nodes.

Parameters
  • nodeTagA – tag of the master node.

  • nodeTagB – tag of the slave node.

  • dofs – degrees of freedom to be glued (e.g.: dofs=xc.ID([0,2,5]) means to equal ux,uz,rotz)

newKPoint(x, y, z=0.0, tol=0.0)

Creates a key point.

Parameters
  • x – x coordinate for the new point.

  • y – y coordinate for the new point.

  • z – z coordinate for the new point (defaults to 0.0).

  • tol – if greter than zero create the point only if there is no other point at a distance smaller than tol, otherwise return the already existing point.

newLine(p1: xc.Pnt, p2: xc.Pnt)

Creates a line between the argument points.

Parameters
  • p1 – from point.

  • p2 – to point.

newLoadCombination(name: str, loadCaseExpression: str, force=False)

Defines a new combination and add it to the domain.

Parameters
  • name – name of the load combination.

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

  • force – if true, force redefinition of the load combination even if it exists.

newLoadPattern(name: str, lpType='default', setCurrent=False)
Creates a times series -modulation of the load

in time-.

Parameters
  • name – name of the new time load pattern.

  • lpType – type of the load pattern -default, uniform_excitation, multi_support_pattern, pbowl_loading-.

  • setCurrent – if true set the newly created load pattern as the current load pattern.

newNodeFromVector(v)

Create a new node from vector

Parameters

v – xc vector

newNodePos2d(pos2d)

Create a new node.

Parameters

pos3d – geom.Pos2d object.

newNodePos3d(pos3d)

Create a new node.

Parameters

pos3d – geom.Pos3d object.

newNodeX(x)

Create a new node.

Parameters

x – x coordinate for the new node.

newNodeXY(x, y)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

newNodeXYZ(x, y, z)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

  • z – z coordinate for the new node.

newQuadSurface(p1: xc.Pnt, p2: xc.Pnt, p3: xc.Pnt, p4: xc.Pnt)

Creates a quad surface between the argument points.

Parameters
  • p1 – first point.

  • p2 – second point.

newRecorder(recorderType, outputHandler=None)

Creates a new recorder on the problem domain.

Parameters
  • recorderType – recorder type.

  • outputHandler – object that will manage the recorder output.

newSPConstraint(nodeTag: int, dof: int, prescribedDisp=0.0)

Prescribe displacement for node DOFs.

Parameters
  • nodeTag – tag of the node.

  • dof – index of the degree of freedom.

  • prescribedDisp – values of the displacement.

newSeedElement(elementType: str)

Create a new seed element.

Parameters
  • elementType – type of the new element (i.e.. ‘ShellMITC4’ or ‘ZeroLength’).

  • nodeTags – list of the identifiers of the element nodes.

newSurface(pointList: Sequence[xc.Pnt])

Creates a surface whose vertices are the argument points.

Parameters

pointList – list of vertices.

newSymmetryConstraint(nodeTag: int, plane)
Prescribe a symmetry boundary condition displacement

for the given node.

Parameters
  • nodeTag – tag of the node.

  • plane – plane (in the case of 3D problems) or line (in the case of 2D problems) that defines the symmetry.

newTimeSeries(name='ts', tsType='constant_ts')
Creates a times series -modulation of the load

in time-.

Parameters
  • name – name of the new time series.

  • tsType – type of the time series -constant_ts, linear_ts, path-ts, pulse_ts, rectangular_ts, triangular_ts or trig_ts-. Defaults to constant_ts.

normalizeEigenvectors(mode)
Normalize the eigenvectors corresponding to the given mode if not

already done.

Parameters

mode – eingenmode.

ordinaryEigenvalues(numModes=1)

Obtains the ordinary eigenvalues of the model stiffness matrix.

Parameters

numModes – number of zero energy modes to obtain.

pickElementsInZone(zone, resultSet, originSet=None)
Return a set containing the elements that lie

inside the zone argument.

Parameters
  • zone – surface representing the zone to load.

  • resultSet – set that will be populated with the picked elements.

  • originSet – set that contains the elements to pick. If None consider the total set.

pickNodeOnPoint(pt, resultSet, originSet=None)
Append to resultSet the nearest node to the point argument

from those in originSet.

Parameters
  • pt – point to load.

  • resultSet – set that will be populated with the picked nodes.

  • originSet – set that contains the nodes to pick. If None consider the total set.

plotTimeSeries(timeSeries, timeIncrement=None, timeUnits=None)

Shows a diagram of the time series.

Parameters
  • timeSeries – the time series to display.

  • timeIncrement – time increment to use in the diagram if None then timeIncrement= duration/100.0

  • timeUnits – string representing the time units (‘days’ or ‘s’ or …).

readControlVars(inputFileName)
Read control var data from the input file an put them as properties

of the model elements.

Parameters

inputFileName – name of the input file containing the data.

Returns

number of properties read.

removeAllLoadPatternsFromDomain()

Remove all load patterns from domain.

removeAllLoadsAndCombinationsFromDomain()

Remove all the load patterns and load combinations from the domain.

removeElement(element)

Remove the given element from the FE problem.

Parameters

element – element to remove.

removeLoadCaseFromDomain(loadCaseName: str)
Add the load case argument (load pattern or combination) to the

domain.

Parameters

loadCaseName – name of the load pattern or combination.

removeLoadCombination(name: str)
Remove the load combination with the given name. Returns true if

the combination has been succesfully removed.

Parameters

name – name of the load combination.

removeLoadPattern(name: str)

Remove the load pattern with the given name.

Parameters

name – name of the new time load pattern.

removeMFreedom_Constraint(constraintToRemove)
Remove the given constrain. Returns true if

the constraint has been succesfully removed.

Parameters

constraintToRemove – constraint to remove.

removeMRMFreedom_Constraint(constraintToRemove)
Remove the given constrain. Returns true if

the constraint has been succesfully removed.

Parameters

constraintToRemove – constraint to remove.

removeNode(node)

Remove the given node from the FE problem.

Parameters

node – node to remove:

removeSPConstraint(constraintToRemove)
Remove the given constrain. Returns true if

the constraint has been succesfully removed.

Parameters

constraintToRemove – constraint to remove.

removeSet(setName: str)

Remove the set whose name corresponds to the argument.

Parameters

setName – name of the set to remove.

renewSet(setName: str)

Redefines the set with the name argument.

Parameters

setName – name of the set to renew.

resetLoadCase()

Remove all the load cases from the domain.

restore(flag: int)

Restore the current state from the current database.

Parameters

flag – integer indentifier for the state to restore in the database.

revertToStart()

Revert the domain to its initial state..

save(flag: int)

Saves the current state on the current database.

Parameters

flag – integer indentifier for the current state in the database.

setBearing(iNod: int, bearingMaterialNames: Sequence[str], orientation=None)

Modelize a bearing on X, XY or XYZ directions.

Parameters
  • iNod – (int) node identifier (tag).

  • (list) (bearingMaterialNames) – (list) material names for the zero length element [mat1,mat2,mat3,mat4,mat5,mat6], where: mat1,mat2,mat3 correspond to translations along local x,y,z axes, respectively, mat3,mat4,mat5 correspond to rotation about local x,y,z axes, respectively.

  • orientation

    (list) of two vectors [x,yp] used to orient

    the zero length element, where: - x: are the vector components in global coordinates defining

    local x-axis (optional)

    • yp: vector components in global coordinates defining a vector

      that lies in the local x-y plane of the element(optional).

    If the optional orientation vector are not specified, the local element axes coincide with the global axes. Otherwise, the local z-axis is defined by the cross product between the vectors x and yp specified in the command line.

Return rtype

(int, int) new node tag, new element tag.

setBearingBetweenNodes(iNodA: int, iNodB: int, bearingMaterialNames: Sequence[str], orientation=None)

Modelize a bearing between the nodes

Parameters
  • iNodA – (int) first node identifier (tag).

  • iNodB – (int) second node identifier (tag).

  • bearingMaterialNames – (list) material names for the zero length element [mat1,mat2,mat3,mat4,mat5,mat6], where: mat1,mat2,mat3 correspond to translations along local x,y,z axes, respectively, mat3,mat4,mat5 correspond to rotation about local x,y,z axes, respectively.

  • orientation

    (list) of two vectors [x,yp] used to orient

    the zero length element, where: x: are the vector components in global coordinates defining

    local x-axis (optional)

    yp: vector components in global coordinates defining a vector

    that lies in the local x-y plane of the element (optional).

    If the optional orientation vector are not specified, the local element axes coincide with the global axes. Otherwise, the local z-axis is defined by the cross product between the vectors x and yp specified in the command line. :return: newly created zero length element that represents the

    bearing.

setBearingOnX(iNod: int, bearingMaterialName: str)

Modelize a bearing on X direction.

Parameters
  • (int) (iNod) – node identifier (tag).

  • (string) (bearingMaterialName) – material name for the zero length element.

setBearingOnXYRigZ(iNod: int, bearingMaterialNames: Sequence[str])

Modelize a non rigid on X and Y directions and rigid on Z bearing.

Parameters
  • (int) (iNod) – node identifier (tag).

  • (string) (bearingMaterialNames) – material names for the zero length element.

setCreepDt(dt)

Set the creep gime increment for TD concrete materials.

setCreepOff()

Deactivates creep for TD concrete materials.

setCreepOn()

Activates creep for TD concrete materials.

setCurrentLoadPattern(lpName: str)

Set the current load pattern.

Parameters

lpName – load pattern name.

setCurrentTime(t)

Set the value of the current pseudo-time.

Parma t

time to set.

setDefaultCoordTransf(coordinateTransformation)
Assigns the coordinate transformation to be used when creating

new elements.

Parameters

coordinateTransformation – default coordinate transfomation.

setDefaultMaterial(material)

Assigns the material to be used when creating new elements.

Parameters

material – default material.

setDefaultMaterials(materials)

Assigns the materials to be used when creating new elements.

Parameters

material – default materials (materials[0]-> regular element handler, materials[1]-> seed element handler).

setElementDimension(elementDimension)

Set the dimension for the new elements (when appropriate).

Parameters

elementDimension – dimension for the new elements (1, 2 or 3).

setFulcrumBetweenNodes(nodeTagA: int, pivotNodeTag: int)

Create a fulcrum between the nodes passed as parameters.

Creates a rigid link between the nodes. It’s called fulcrum because it’s pinned on pivotNodeTag.

Parameters
  • nodeTagA – tag of the primary node.

  • pivotNodeTag – tag of the pivot (secondary node).

setImperfectionsX(nodeSet, slopeX=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeX – out of plumbness on x axis.

setImperfectionsXY(nodeSet, slopeX=0.002, slopeY=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeX – out of plumbness on x axis.

  • slopeY – out of plumbness on y axis.

setImperfectionsY(nodeSet, slopeY=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeY – out of plumbness on y axis.

setIntersection(setName: str, setsToIntersect: Sequence[xc.Set])
Return a set that contains the union of the

arguments.

Parameters
  • setName – name of the set to create. If ‘auto’ then assign a random (unique) name.

  • setsToSum – sets to sum in a list.

setNodePropertyFromElements(compName: str, xcSet: xc.Set, function, propToDefine: str, transformToLocalCoord=False)
define a property in the nodes from its value at the neighbour

elements.

Parameters
  • compName – name of the component of the magnitude (‘sigma_11’, ‘strain_xx’, …)

  • xcSet – set of nodes to define the propery at.

  • function – function to call to retrieve the component value.

  • propToDefine – name of the property to define at the nodes.

  • transformToLocalCoord – if true (and appropriate), express the obtained result in local coordinates.

setNumberOfDOFs(nDOFs)

Set the number of degrees of freedom for the new nodes.

Parameters

nDOFs – number of degrees of freedom for each new node.

setPreprocessor(preprocessor: xc.Preprocessor)

Sets suitable values for the members from the dimension of the space and the number of DOFs for each node obtained from the argument.

Parameters

preprocessor – preprocessor of the finite element problem.

setPrescribedDisplacements(nodeTag: int, prescDisplacements: Sequence[float])

Prescribe displacement for node DOFs.

Parameters
  • nodeTag – tag of the node.

  • prescDisplacements – (list) values of the displacements.

setRigidBeamBetweenNodes(nodeTagA: int, nodeTagB: int)

Create a rigid beam between the nodes passed as parameters.

Parameters
  • nodeTagA – tag of the master node.

  • nodeTagB – tag of the slave node.

setRigidRodBetweenNodes(nodeTagA: int, nodeTagB: int)

Create a rigid rod between the nodes passed as parameters.

Parameters
  • nodeTagA – tag of the master node.

  • nodeTagB – tag of the slave node.

setSolutionProcedureType(solutionProcedureType: solution.predefined_solutions.SolutionProcedure)
Set the solution procedure that will be used

to solve the finite element problem.

Parameters

solutionProcedureType – type of the solution procedure.

setSum(setName: str, setsToSum: Sequence[xc.Set])
Return a set that contains the union of the

arguments.

Parameters
  • setName – name of the set to create. If ‘auto’ then assign a random (unique) name.

  • setsToSum – sets to sum in a list.

setUniaxialBearing2D(iNod: int, bearingMaterialName: str, direction)

Modelize an uniaxial bearing on the defined direction.

Parameters
  • (int) (iNod) – node identifier (tag).

  • (str) (bearingMaterialName) – material name for the zero length element.

  • direction – direction of the bearing.

Return rtype

(int, int) new node tag, new element tag.

setVerbosityLevel(level)
Set the verbosity level (0 to 1000). A higher verbosity

level means more info printed out.

Parameters

level – verbosity level.

setupAnalysis()

Create the analysis object if needed.

zeroEnergyModes(numModes=1)

Obtains the zero energy modes of the finite element model.

Parameters

numModes – number of zero energy modes to obtain.

class model.predefined_spaces.SolidMechanics1D(nodes, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.PredefinedSpace

fixNode0(nodeTag: int, restrainedNodeId: Optional[str] = None)

Restrain both node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

newNode(x)

Create a new node.

Parameters

x – x coordinate for the new node.

class model.predefined_spaces.SolidMechanics2D(nodes, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.PredefinedSpace

fixNode00(nodeTag: int, restrainedNodeId: Optional[str] = None)

Restrain both node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F(nodeTag: int, restrainedNodeId: Optional[str] = None)

Restrain only displacement DOFs (i. e. Ux= 0 and Uy= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF0(nodeTag: int, restrainedNodeId: Optional[str] = None)

Restrain only displacement DOFs (i. e. Ux= 0 and Uy= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

getDispComponentIndexFromName(compName: str)
Return the component index from the

displacement component name.

Parameters

compName – displacement component name.

getDisplacementComponentsLabels()

Return a list with the labels of the displacement components.

getDisplacementDOFs()

Return the indices of the displacement DOFs.

getDisplacementVector(nodeTag: int)
Return a vector with the displacement components of the

node motion.

Parameters

nodeTag – identifier of the node.

getForceComponents()

Return the components of the load vectors that correspond to forces.

getMomentComponents()

Return the components of the load vectors that correspond to moments.

getRotationalDOFs()

Return the indices of the rotational DOFs.

getStrainComponentIndexFromName(compName: str, responseId=None)
Return the component index from the

strain component name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

getStressComponentIndexFromName(compName: str, responseId=None)
Return the component index from the

stress component name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

newNode(x, y)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

class model.predefined_spaces.SolidMechanics3D(nodes, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.PredefinedSpace

fixNode000(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all three node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

getDispComponentIndexFromName(compName)

Return the component index from the displacement name.

getDisplacementComponentsLabels()

Return a list with the labels of the displacement components.

getDisplacementDOFs()

Return the indices of the displacement DOFs.

getDisplacementVector(nodeTag)

Return a vector with the displacement components of the node motion.

Parameters

nodeTag – node identifier.

getForceComponents()

Return the components of the load vectors that correspond to forces.

getMomentComponents()

Return the components of the load vectors that correspond to moments.

getRotationalDOFs()

Return the indices of the rotational DOFs.

getStrainComponentIndexFromName(compName, responseId=None)
Return the component index from the

strain name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

getStressComponentIndexFromName(compName, responseId=None)
Return the component index from the

stress name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

newNode(x, y, z)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

  • z – z coordinate for the new node.

class model.predefined_spaces.StructuralMechanics(nodes, dimSpace: int, numDOFs: int, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.PredefinedSpace

Structural mechanics finite element problem.

createElasticBeams(xcSet, crossSection, trf, xzVector=None, nDiv=4)
Meshes the lines of the set argument with ElasticBeam3d

elements.

Parameters
  • xcSet – set with the lines to mesh.

  • trf – coordinate transformation to assign to the elements.

  • xzVector – vector defining transformation XZ plane.

  • crossSection – object that defines the geometry of the element section.

  • nDiv – number of divisions on each line.

createTrusses(xcSet: xc.Set, material, area, crossSection=None, corotational=False)
Meshes the lines of the set argument with Truss

elements.

Parameters
  • xcSet – set with the lines to mesh.

  • material – material to assign to the elements.

  • area – area to assign to the elements.

  • crossSection – object that defines the geometry of the element section.

  • corotational – if true, use corotational formulation.

getSuitableXZVector(iNode, jNode)
Return a vector that can be used to define

a coordinate transformation for an element between the node arguments.

Parameters
  • iNode – first node.

  • jNode – second node.

class model.predefined_spaces.StructuralMechanics2D(nodes, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.StructuralMechanics

fixNode000(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all three node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode00F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only displacement DOFs (i. e. Ux= 0 and Uy= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all three node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0FF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only X displacement DOF (i. e. Ux= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain displacement Y and rotation (i. e. Uy= 0, Theta= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF0F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only Y displacement DOF (i. e. Uy= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeFF0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only rotation DOF (i. e. Theta= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodesLine(line, restrainedNodeId: Optional[str] = None)

Restrain all DOFs of the line nodes.

Parameters
  • line – line whose nodes will be restrained.

  • restrainedNodeId – identifier of the node to display with the reaction values.

getDispComponentIndexFromName(compName)
Return the component index from the

displacement name.

Parameters

compName – name of the displacement component.

getDisplacementComponentsLabels()

Return a list with the labels of the displacement components.

getDisplacementDOFs()

Return the indices of the displacement DOFs.

getDisplacementVector(nodeTag)

Return a vector with the displacement components of the node motion.

getForceComponents()

Return the components of the load vectors that correspond to forces.

getMomentComponents()

Return the components of the load vectors that correspond to moments.

getRotationVector(nodeTag)

Return a vector with the rotation components of the node motion.

getRotationalDOFs()

Return the indices of the rotational DOFs.

getStrainComponentIndexFromName(compName, responseId=None)
Return the component index from the

generalized strain name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

getStressComponentIndexFromName(compName, responseId=None)
Return the component index from the

stress name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

newCorotCrdTransf(trfName)

Creates a new 2D corotational transformation.

Parameters

trfName – name for the new transformation.

newCrdTransf(trfName, trfType='linear')

Creates a new 3D transformation.

Parameters
  • trfName – name for the new transformation.

  • trfType – type of the transformation (‘linear’, ‘p_delta’ or ‘corotational’)

newLinearCrdTransf(trfName)

Creates a new 2D linear transformation.

Parameters

trfName – name for the new transformation.

newNode(x, y)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

newPDeltaCrdTransf(trfName)

Creates a new 2D PDelta transformation.

Parameters

trfName – name for the new transformation.

class model.predefined_spaces.StructuralMechanics3D(nodes, solProcType: solution.predefined_solutions.SolutionProcedure = <class 'solution.predefined_solutions.SimpleStaticLinear'>)

Bases: model.predefined_spaces.StructuralMechanics

3D structural mechanics

Variables
  • beamStrainComponents – component names of beam generalized strains.

  • shellStrainComponents – component names of shell generalized strains.

  • beamStressComponents – component names of beam generalized stresses.

  • shellStressComponents – component names of shell generalized stresses.

LstNodes6DOFConstr(lstNodes, constrCond)

Constraint the nodes in the list passed as parameter according to given 6-values set of constraints conditions

Parameters
  • lstNodes – list of nodes to which apply the constraints

  • constrCond

    list of constraint conditions, expressed as

    [uX, uY, uZ,rotX, rotY, rotZ], where:

    • uX, uY, uZ: translations in the X, Y and Z directions;

    • rotX, rotY, rotZ: rotations about the X, Y and Z axis

    • ’free’: means no constraint values

beamStrainComponents = ['epsilon', 'kappa_z', 'kappa_y', 'gamma_y', 'gamma_z', 'theta']
beamStressComponents = ['N', 'P', 'My', 'Mz', 'Qy', 'Qz', 'Vy', 'Vz', 'T']
distributeLoadOnNodes(loadSVS, nodeSet, loadPattern=None)
Distribute the load (represented by a sliding vector system

between the nodes of the set.

Parameters
  • loadSVS – sliding vector system representing the load to be distributed.

  • nodeSet – the nodes receiving the loads.

  • loadPattern – load pattern to create the loads into. If None use the current load pattern.

fixNode000_000(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all six node DOFs (i. e. make them zero).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_00F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for the rotation about Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_0F0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for the rotation about Y axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_0FF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain the displacements (Ux,Uy and Uz) and the rotation about X axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_F00(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for the rotation about X axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_F0F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain the displacements (Ux,Uy and Uz) and the rotation about Y axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_FF0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain the displacements (Ux,Uy and Uz) and the rotation about Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode000_FFF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only displacement DOFs (i. e. Ux= 0, Uy= 0 and Uz= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0_00F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for Y displacement and the rotation about Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0_0F0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for Y displacement and the rotation about Y axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0_0FF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for Y displacement and the rotations about Y and Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0_F00(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for Y displacement and the rotation about X axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0F0_FFF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for Y displacement and the rotations about Y and Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNode0FF_FFF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only X displacement DOF (i. e. Ux= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00_00F(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for X displacement and the rotation about Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00_0F0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for X displacement and the rotation about Y axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00_0FF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for X displacement and the rotations about Y and Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00_F00(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for X displacement and the rotation about X axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeF00_FFF(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain all DOFs except for X displacement and the rotations about Y and Z axis.

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeFFF_000(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only rotations (i. e. ThetaX= 0, ThetaY= 0 and ThetaZ= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

fixNodeFFF_0F0(nodeTag, restrainedNodeId: Optional[str] = None)

Restrain only X and Z rotations (i. e. ThetaX= 0, and ThetaZ= 0).

Parameters
  • nodeTag – node identifier.

  • restrainedNodeId – identifier of the node to display with the reaction values.

getDispComponentIndexFromName(compName)
Return the component index from the

displacement name.

Parameters

compName – strain component name.

getDisplacementComponentsLabels()

Return a list with the labels of the displacement components.

getDisplacementDOFs()

Return the indices of the displacement DOFs.

getDisplacementVector(nodeTag)
Return a vector with the displacement components of the node

motion.

Parameters

nodeTag – node identifier.

getForceComponents()

Return the components of the load vectors that correspond to forces.

getMomentComponents()

Return the components of the load vectors that correspond to moments.

getRotationVector(nodeTag)
Return a vector with the rotational components of the node

motion.

Parameters

nodeTag – node identifier.

getRotationalDOFs()

Return the indices of the rotational DOFs.

getStrainComponentIndexFromName(compName, responseId)
Return the component index from the

generalized strain name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

getStressComponentIndexFromName(compName, responseId=None)
Return the component index from the

stress name.

Parameters
  • compName – strain component name.

  • responseId – response identifiers of the material.

newCorotCrdTransf(trfName, xzVector)

Creates a new 3D corotational transformation.

Parameters
  • trfName – name for the new transformation.

  • xzVector – vector defining transformation XZ plane.

newCrdTransf(trfName, xzVector, trfType='linear')

Creates a new 3D transformation.

Parameters
  • trfName – name for the new transformation.

  • xzVector – vector defining transformation XZ plane.

  • trfType – type of the transformation (‘linear’, ‘p_delta’ or ‘corotational’)

newLinearCrdTransf(trfName, xzVector)

Creates a new 3D linear transformation.

Parameters
  • trfName – name for the new transformation.

  • xzVector – vector defining transformation XZ plane.

newNode(x, y, z)

Create a new node.

Parameters
  • x – x coordinate for the new node.

  • y – y coordinate for the new node.

  • z – z coordinate for the new node.

newPDeltaCrdTransf(trfName, xzVector)

Creates a new 3D PDelta transformation.

Parameters
  • trfName – name for the new transformation.

  • xzVector – vector defining transformation XZ plane.

releaseBeamEnd(beamElement, stiffnessFactors, nodesToRelease)

Releases some degrees of fredom at the extremities of the beam element.

Parameters
  • beamElement – element that will be released.

  • nodesToRelease – indexes of the element nodes to release.

StiffnessFactors

factors that multiply the element stiffnesses on each DOF: [KX, KY, KZ, KrotX, KrotY, KrotZ] the axis correspond to the local axis of the element.

releaseLineExtremities(ln, stiffnessFactors=[10000000.0, 10000000.0, 10000000.0, 0.001, 0.001, 0.001], extremitiesToRelease=[0, 1])
Releases the rotational degrees of fredom at the extremities

of the line.

Parameters
  • ln – line whose end elements will be pinned.

  • extremitiesToRelease – indexes of the element extremities to release: [0]->only the “from” point [1]->only the “to” point [0,1]-> both extremities.

StiffnessFactors

factors that multiply the element stiffnesses on each DOF: [KX, KY, KZ, KrotX, KrotY, KrotZ] the axis correspond to the local axis of the element.

setBeamBetweenNodes(nodeA, nodeB, sectionName, nmbTransf=None, trfType='linear', beamElementType='ElasticBeam3d')

Creates a beam/column element between the two nodes being passed as parameters.

Parameters
  • nodeA – bar’s from node.

  • nodeB – bar’s to node.

  • sectionName – name of the section material to assign to the element.

  • nmbTransf – name of the coordinate transformation to use for the new bar.

  • trfType – type of the transformation (‘linear’, ‘p_delta’ or ‘corotational’) used only if nmbTransf is None.

  • stiffnessFactor – factor to apply to the beam stiffness.

setHugeBeamBetweenNodes(nodeA, nodeB, nmbTransf=None, trfType='linear', stiffnessFactor=1.0)

Creates a very stiff bar between the two nodes being passed as parameters. (it was a workaround to the problem with the reactions values in nodes when using multipoint constraints. This problem has been be solved with the implementation of MFreedom_ConstraintBase::addResistingForceToNodalReaction).

Parameters
  • nodeA – bar’s from node.

  • nodeB – bar’s to node.

  • nmbTransf – name of the coordinate transformation to use for the new bar.

  • trfType – type of the transformation (‘linear’, ‘p_delta’ or ‘corotational’) used only if nmbTransf is None.

  • stiffnessFactor – factor to apply to the beam stiffness.

setHugeTrussBetweenNodes(nodeA, nodeB, stiffnessFactor=1.0)

Creates a very stiff bar between the two nodes being passed as parameters.

Parameters
  • nodeA – tag of bar’s from node.

  • nodeB – bar’s to node.

  • stiffnessFactor – factor to apply to the beam stiffness.

shellStrainComponents = ['epsilon_1', 'epsilon_2', 'epsilon_12', 'kappa_1', 'kappa_2', 'kappa_12', 'gamma_13', 'gamma_23']
shellStressComponents = ['n1', 'n2', 'n12', 'm1', 'm2', 'm12', 'q13', 'q23']
model.predefined_spaces.gdls_elasticidad2D(nodes)

Defines the dimension of the space: nodes by two coordinates (x,y) and two DOF for each node (Ux,Uy)

Parameters

nodes – nodes handler

model.predefined_spaces.gdls_elasticidad3D(nodes)
Defines the dimension of the space: nodes by three coordinates (x,y,z)

and three DOF for each node (Ux,Uy,Uz)

Parameters

nodes – preprocessor nodes handler

model.predefined_spaces.gdls_resist_materials2D(nodes)

Defines the dimension of the space: nodes by two coordinates (x,y) and three DOF for each node (Ux,Uy,theta)

Parameters

nodes – preprocessor nodes handler

model.predefined_spaces.gdls_resist_materials3D(nodes)

Define the dimension of the space: nodes by three coordinates (x,y,z) and six DOF for each node (Ux,Uy,Uz,thetaX,thetaY,thetaZ)

Parameters

nodes – preprocessor nodes handler

model.predefined_spaces.getModelSpace(preprocessor: xc.Preprocessor)

Return a PredefinedSpace from the dimension of the space and the number of DOFs for each node obtained from the preprocessor.

Parameters

preprocessor – preprocessor of the finite element problem.

model.predefined_spaces.getModelSpaceFromPreprocessor(preprocessor: xc.Preprocessor)

Return a PredefinedSpace from the dimension of the space and the number of DOFs for each node obtained from the preprocessor.

Parameters

preprocessor – preprocessor of the finite element problem.

model.predefined_spaces.getStructuralMechanics2DSpace(preprocessor: xc.Preprocessor)

Return a PredefinedSpace from the dimension of the space and the number of DOFs for each node obtained from the preprocessor.

Parameters

preprocessor – preprocessor of the finite element problem.

model.predefined_spaces.getStructuralMechanics3DSpace(preprocessor: xc.Preprocessor)

Return a tStructuralMechanics3DSpace from an already defined preprocessor.

Parameters

preprocessor – preprocessor of the finite element problem.

model.predefined_spaces.getSuitableXZVector(iNode, jNode)
Return a vector that can be used to define

a coordinate transformation for an element between the node arguments.

Parameters
  • iNode – first node.

  • jNode – second node.

model.predefined_spaces.glueSets(preprocessor: xc.Preprocessor, DOF2Glue, masterSet, slaveSet, onCoord=None)

Creates rigid links between nodes in masterSet and their corresponding ones (for reasons of proximity) in slaveSet. Each node in masterSet coupled with one and only one node in slaveSet.

Parameters
  • preprocessor – preprocessor of the finite element problem.

  • DOF2Glue – degrees of freedom to match. (e.g. [1,4] equals DOF 1 and 4 between coupled nodes.

  • masterSet – set with the master nodes

  • slaveSet – set with the slave nodes

  • onCoord – coordinate on which the search of the nearest node is based (‘X’,’Y’,’Z’). If None or other value, the search is based on the minimum distance. (Defaults to None)

model.predefined_spaces.pick_elements_in_zone(plg, resultSet, originSet)
Return a set containing the elements that lie

inside the zone argument.

Parameters
  • plg – polygon to select the elements inside.

  • resultSet – set that will be populated with the elements.

  • originSet – set that contains the elements to check.

model.predefined_spaces.pick_node_on_point(pos, resultSet, originSet)
Append to resultSet the nearest node to the point argument

from those in originSet.

Parameters
  • pos – 3D point.

  • resultSet – set that will be populated with the picked node.

  • originSet – set that contains the nodes to pick.

model.predefined_spaces.setBearingBetweenNodes(prep, iNodA, iNodB, bearingMaterialNames, orientation=None)

To DEPRECATE. 3/11/2023 LP.

model.predefined_spaces.setImperfectionsX(nodeSet, slopeX=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeX – out of plumbness on x axis.

model.predefined_spaces.setImperfectionsXY(nodeSet, slopeX=0.002, slopeY=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeX – out of plumbness on x axis.

  • slopeY – out of plumbness on y axis.

model.predefined_spaces.setImperfectionsY(nodeSet, slopeY=0.002)

Set the initial imperfection of the model.

Parameters
  • nodeSet – set which nodes will be moved.

  • slopeY – out of plumbness on y axis.

model.predefined_spaces.setWebOrientation(lines, vertBarsWebOrientationVector=[[0][1][0]], barsWebOrientationVector=[[0][0][1]])
Defines a property called ‘webOrientation’ on each line that contains

a vector that will define the orientation of the web of the structural shape.

Parameters

lines – line container.

VertBarsWebOrientationVector

orientation of the web for the vertical members.

BarsWebOrientationVector

orientation of the web for the non vertical members.

model.predefined_spaces.set_bearing_between_nodes(prep, iNodA, iNodB, bearingMaterialNames, orientation=None)

Modelize a bearing between the nodes

Parameters
  • prep – preprocessor

  • iNodA – (int) first node identifier (tag).

  • iNodB – (int) second node identifier (tag).

  • bearingMaterialNames – (list) material names for the zero length element [mat1,mat2,mat3,mat4,mat5,mat6], where: mat1,mat2,mat3 correspond to translations along local x,y,z axes, respectively, mat3,mat4,mat5 correspond to rotation about local x,y,z axes, respectively.

  • orientation

    (list) of two vectors [x,yp] used to orient

    the zero length element, where: x: are the vector components in global coordinates defining

    local x-axis (optional)

    yp: vector components in global coordinates defining a vector

    that lies in the local x-y plane of the element(optional).

    If the optional orientation vector are not specified, the local element axes coincide with the global axes. Otherwise, the local z-axis is defined by the cross product between the vectors x and yp specified in the command line. :return: newly created zero length element that represents the bearing.