Step actions

Step actions define actions run during a simulation. They are defined within a *step definition, line by line, by specifying their name and a list of option=value, for example

*step, jobName=myJob,
    dirichlet, name=bottom,   nSet=bottom,   field=displacement, 2=0, 1=0
    dirichlet, name=rightTop, nSet=rightTop, field=displacement, 2=0,
    distributedload, name=dload1, surface=top,  type=pressure, magnitude=10, f(t)=t*2
    distributedload, name=dload2, surface=left, type=pressure, magnitude=50, f(t)=t

bodyforce - Bodyforce loads

Relevant module: edelweissfe.stepactions.bodyforce

Options:

Option

Description

forceVector

The force vector

delta

In subsequent steps only: define the updated force vector incrementally

f(t)

(Optional) define an amplitude in the step progress interval [0…1]

Example: testfiles/BodyForce3D/test.inp
*include, input=mesh.inp

*material, name=linearelastic, id=le
30000.0, 0.15

*section, name=section1, material=le, type=solid
all

*job, name=c3d8job, domain=3d
*solver, solver=NIST, name=theSolver

*fieldOutput
create=perNode, name=displacement, elSet=all, field=displacement, result=U, name=displacement
create=perElement, name=stress, elSet=all, result=stress, quadraturePoint=1
create=perElement, name=strain, elSet=all, result=strain, quadraturePoint=1
create=perNode, name=RF, nSet=top, result=P, field=displacement

*output, type=ensight, name=ensightExport
create=perNode,    fieldOutput=displacement
create=perElement, fieldOutput=stress
create=perElement, fieldOutput=strain
configuration, overwrite=yes

*output, type=monitor, name=myNodeSetMonitor
fieldOutput=RF, f(x)='sum(x[:,0])', name=ForceX
fieldOutput=RF, f(x)='sum(x[:,1])', name=ForceY
fieldOutput=RF, f(x)='sum(x[:,2])', name=ForceZ

*step, solver=theSolver, maxInc=1e-1, minInc=1e-5, maxNumInc=1000, maxIter=25, stepLength=1
options, category=NISTSolver, extrapolation=linear
dirichlet, name=top,  nSet=top,   field=displacement, 1=0.0, 2=0.0, 3=.0
bodyforce, name=bforce, elSet=all, forceVector='0.0, 10.0, 20.0', f(t)=t

dirichlet - Standard dirichlet BC

Relevant module: edelweissfe.stepactions.dirichlet

Options:

Option

Description

nSet

The node set for application of the BC

1,2,3,...

Prescribed values for components of the physical field

components

Prescribed values using a np.ndarray for representation; use ‘x’ for ignored values

field

Field for which the boundary condition is active

analyticalField

(Optional) scales the defined boundary condition

f(t)

(Optional) define an amplitude in the step progress interval [0…1]

distributedload - Distributed surface loads

Relevant module: edelweissfe.stepactions.distributedload

Options:

Option

Description

surface

Surface for application of the distributed load

magnitude

Magnitude of the distributed load

delta

In subsequent steps only: define the new magnitude incrementally

f(t)

(Optional) define an amplitude in the step progress interval [0…1]

type

The load type, e.g., pressure or surface traction; Must be supported by the element type

Example: testfiles/DLoad/test.inp
*modelGenerator, generator=planeRectQuad, name=gen
elType=CPE4
nX=20
nY=5
l=100
h=25

*elSet, elSet=loadEls
100,95,90,85,80

*surface, type=element, name=surfaceLoad
**elset, faceID
loadEls, 3


*section, name=section1, thickness=1.0, material=mat, type=plane
all
*material, name=VonMises, id=mat
210000, 0.3, 550, 1000, 200, 1400

*job, name=cpe4job, domain=2d
*solver, solver=NIST, name=theSolver

*fieldOutput
create=perNode, name=displacement, elSet=all, field=displacement, result=U, name=displacement
create=perNode, name=displacement, nSet=gen_left, field=displacement, result=P, name=RF
create=perElement, name=stress, elSet=all, result=stress, quadraturePoint=1
create=perElement, name=strain, elSet=all, result=strain, quadraturePoint=1

*output, type=monitor, name=ensightExport
fieldOutput = RF, f(x) = 'sum ( x[:, 1])'

*output, type=ensight, name=ensightExport
create=perNode,    fieldOutput=displacement
create=perElement, fieldOutput=stress
create=perElement, fieldOutput=strain
configuration, overwrite=yes
*step, solver=theSolver, maxInc=1e-1, minInc=1e-5, maxNumInc=1000, maxIter=25, stepLength=1
options, category=NISTSolver, extrapolation=linear
dirichlet, name=left,  nSet=gen_left,   field=displacement, 1=0.0, 2=0.0
distributedload, name=dload, surface=gen_top, type=pressure, magnitude=0.15, f(t)=t

geostatic - Geostatic stress states

Relevant module: edelweissfe.stepactions.geostatic

Initialize materials to an geostatic stress state

Options:

Option

Description

p1

sig_x=sig_y=sig_z in first point

h1

y coordinate of first point, default=1.0

p2

s11=s22=s33 in second point, default=p1

h2

y coordinate of second point, default=-1.0

xLateral

ratio of sig_x/sig_y, default=1.0

zLateral

ratio of sig_z/sig_y, default=1.0

Example: testfiles/GeoStatic/test.inp
*modelGenerator, generator=planeRectQuad, name=gen
l=50
h=150
nX=10
nY=30
elType=CPE4

*material, name=linearElastic, id=le
210000, 0.3

*section, name=section1, thickness=1.0, material=le, type=plane
all

*job, name=cpe4job, domain=2d
*solver, solver=NIST, name=theSolver
*fieldOutput
create=perNode, name=dispTop, nSet=gen_top,       field=displacement, result=U, f(x)='mean(x[:,1])'
create=perNode, name=RFBottom, nSet=gen_bottom,    field=displacement, result=P, f(x)='sum(x[:,1])'
create=perNode, elSet=all,  field=displacement, result=U, name=displacement
create=perElement, elSet=all,  result=stress,  name=S11,  quadraturePoint=1, f(x)='x[:,0]'
create=perElement, elSet=all,  result=stress,  name=S22,  quadraturePoint=1, f(x)='x[:,1]'
create=perElement, elSet=all,  result=stress,  name=S33,  quadraturePoint=1, f(x)='x[:,2]'

*output, type=monitor
fieldOutput=dispTop
*output, type=monitor
fieldOutput=RFBottom

*output, type=ensight, name=ensightExport
create=perNode, fieldOutput=displacement
create=perElement, fieldOutput=S11
create=perElement, fieldOutput=S22
create=perElement, fieldOutput=S33
configuration, overwrite=yes


*step, solver=theSolver, maxInc=0.5
dirichlet, name=left,   nSet=gen_left,   field=displacement, 1=0.0,
dirichlet, name=right,  nSet=gen_right,   field=displacement, 1=0.0
dirichlet, name=bottom, nSet=gen_bottom,   field=displacement, 2=0.0,
geostatic, name=geo, elSet=all, p1=-10, h1=150, p2=-5, h2=0, xLateral=1.0, zLateral=1.0
distributedload, name=dlTop, surface=gen_top, magnitude=10, f(t)=1, type=pressure

*step, solver=theSolver, maxInc=1e-1,
distributedload, name=dlTop, delta=-10.0, f(t)=t

indirectcontrol - Indirect displacement control

Relevant module: edelweissfe.stepactions.indirectcontrol

Options:

Option

Description

dof1

Degree of freedom for the constraint ( model access expression )

dof2

Degree of freedom for the constraint ( model access expression )

L

Final distance (e.g. crack opening)

Example: testfiles/IndirectDisplacementControl/test.inp
*job, name=job, domain=3d

*solver, solver=NISTPArcLength, name=NISTPArcLen

*modelGenerator, generator=boxGen, name=gen
lX     = 100
lY     = 1
lZ     = 1
nX     = 9
nY     = 1
nZ     = 1
elType = GC3D8

*material, name=gcdp, id=concrete
**E         nu      fcy         fcu         fbu         ftu         Df          Ah
100.0,      0.00,   10,         30,         35,         3.00,       0.85,       0.12,
**Bh        Ch      Dh          As          softmod     l           m           omegaMax
0.003,      2.0,    1e-6,       15.0,       .1,         2,          1.05,       1,
**derivativeMethod, dTThresholdElasticStiffness
1,                  1e-8

*section, name=concrete, material=concrete, type=solid
all

*modelGenerator, generator=findClosestNode, name=closestN1, executeAfterManualGeneration=True
location='40, 0, 0'
storeIn=IDC1

*modelGenerator, generator=findClosestNode, name=closestN2, executeAfterManualGeneration=True
location='60, 0, 0'
storeIn=IDC2

*step, maxInc=1, minInc=1, maxNumInc=100000, maxIter=25, stepLength=1, solver=NISTPArcLen
setfield,   name=omegaIni,  fieldOutput=alphaDWeak, value=1e-2, type=uniform

*step, maxInc=1e-2, startInc=1e-2, minInc=1e-6, maxNumInc=100000, maxIter=25, stepLength=1, solver=NISTPArcLen
options, category=Ensight, intermediateSaveInterval=1, minDTForOutput=0
options, category=NISTArcLength, arcLengthController=indirectcontrol, stopCondition='fieldOutputs["I1pMax"] > 0.01'

indirectcontrol, dof1='model.nodeSets["IDC1"][0].fields["displacement"]', cVector1='[-1,0,0]', dof2='model.nodeSets["IDC2"][0].fields["displacement"]', cVector2='[1,0,0]', L=1.,

dirichlet, name=leftX, nSet=gen_left,  field=displacement, 1=0.
dirichlet, name=leftY, nSet=gen_left,  field=displacement, 2=0.
dirichlet, name=leftZ, nSet=gen_left,  field=displacement, 3=0.
dirichlet, name=right, nSet=gen_right, field=displacement, 1=1.

*fieldOutput
name=displacement,    create=perNode, elSet=all, field=displacement, result=U
name=nonlocal_damage, create=perNode, elSet=all, field=nonlocal damage, result=U

name=strain, create=perElement, elSet=all, result=strain, quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'
name=stress, create=perElement, elSet=all, result=stress, quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'
name=omega,  create=perElement, elSet=all, result=omega,  quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'
name=alphaP, create=perElement, elSet=all, result=alphaP, quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'
name=alphaD, create=perElement, elSet=all, result=alphaD, quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'
name=I1p,    create=perElement, elSet=all, result=I1p,    quadraturePoint=0:8, f(x)='np.mean(x,axis=1)'

name=I1pMax,    create=perElement, elSet=all, result=I1p,    quadraturePoint=0:8, f(x)='np.max(x)', saveHistory=true
name=alphaDMax, create=perElement, elSet=all, result=alphaD, quadraturePoint=0:8, f(x)='np.max(x)', saveHistory=true
name=omegaMax,  create=perElement, elSet=all, result=omega,  quadraturePoint=0:8, f(x)='np.max(x)', saveHistory=true

name=alphaDWeak, create=perElement, elSet=gen_centerSliceX, result=alphaD, quadraturePoint=0:8

name=U1,  create=perNode, nSet=gen_right, field=displacement, result=U, f(x)='mean(x[:,0])', saveHistory=true, export=U
name=RF1, create=perNode, nSet=gen_right, field=displacement, result=P, f(x)='sum(x[:,0])', saveHistory=true, export=RF

*output, type=ensight, name=test
create=perNode, fieldOutput=displacement
create=perNode, fieldOutput=nonlocal_damage
create=perElement, fieldOutput=omega
create=perElement, fieldOutput=I1p
create=perElement, fieldOutput=alphaP
create=perElement, fieldOutput=alphaD
create=perElement, fieldOutput=stress
create=perElement, fieldOutput=strain
configuration, overwrite=yes

*output, type=meshPlot
figure=1, axSpec=111, create=xyData, x=U1, y=RF1

indirectcontractioncontrol - Indirect displacement – contraction ring control

Relevant module: edelweissfe.stepactions.indirectcontrol

Options:

Option

Description

contractionNSet

The node set defining the contraction ring

L

Final distance (e.g. crack opening)

exportCVector

(Optional) file to export the computed c vector

initializematerial - Initialize materials

Relevant module: edelweissfe.stepactions.initializematerial

Let materials initialize themselves (e.g., state vars depending on material parameters…) !

modelupdate - Update the model

Relevant module: edelweissfe.stepactions.modelupdate

Options:

Option

Description

update

Model accessible, executable expression

nodeforces - Concentrated node forces

Relevant module: edelweissfe.stepactions.nodeforces

Options:

Option

Description

nSet

Node set for application of the boundary condition

1,2,3,...

Prescribed values for components of the physical field

components

Prescribed values using a np.ndarray for representation; use ‘x’ for ignored values

field

Field for which the boundary condition is active

f(t)

(Optional) define an amplitude in the step progress interval [0…1]

Example: testfiles/NodeForces/test.inp
*material, name=VonMises, id=mat
210000, 0.3, 550, 1000, 200, 1400

*section, name=section1, thickness=1.0, material=mat, type=plane
all

*job, name=cps4job, domain=2d
*solver, solver=NIST, name=theSolver

*modelGenerator, generator=planeRectQuad, name=gen
x0=0, l=50
y0=0, h=100
elType=CPS4
nX=10
nY=10

*fieldOutput
create=perNode, nSet=gen_bottom, result=P, field=displacement, name=RF
create=perNode, elSet=all, field=displacement, result=U, name=displacement

*output, type=monitor
fieldOutput=RF, f(x)='mean(x[:,1])'

*output, type=ensight, name=esExport
create=perNode, fieldOutput=displacement
configuration, overwrite=yes

*step, maxInc=1e-1, minInc=1e-8, maxNumInc=50, maxIter=25, stepLength=100, solver=theSolver
dirichlet, name=bottom, nSet=gen_bottom,  field=displacement, 2=0, 1=0
nodeforces, name=cloadTop, nSet=gen_top, field=displacement, 2=-50
*step, maxInc=1e-1, minInc=1e-8, maxNumInc=1000, maxIter=25, stepLength=100, solver=theSolver
nodeforces, name=cloadTop, nSet=gen_top, 2=-10, f(t)=sin(t*2*pi)
*step, maxInc=1e-1, minInc=1e-8, maxNumInc=1000, maxIter=25, stepLength=100, solver=theSolver
nodeforces, name=cloadTop, nSet=gen_top, 2=+50, f(t)=t

setfield - Set a field to a prescribed value

Relevant module: edelweissfe.stepactions.setfield

Options:

Option

Description

fieldOutput

Field output to be set

type

‘Const’ or ‘analyticalField’

value

Scalar value if type ‘const’; name of analyticalField if type ‘analyticalField’

setinitialconditions - Set initial conditions to elements

Relevant module: edelweissfe.stepactions.setinitialconditions

Pass initial conditions to elements.

Options:

Option

Description

property

The name of the property to be initialized

values

The property values

elSet

(Optional) the element set for which the initaliziation is performed

Implementing your own step actions

Subclass from the step action base class in module edelweissfe.stepactions.base.stepactionbase

class edelweissfe.stepactions.base.stepactionbase.StepActionBase(name, definition, jobInfo, model, fieldOutputController, dofmanager, journal)[source]

This is the abase class for all step actions. User defined step actions can override the methods.

Parameters
  • name (str) – The name of this step action.

  • definition (dict) – A dictionary containing the options for this step action.

  • jobInfo (dict) – A dictionary containing the information about the job.

  • model (FEModel) – A dictionary containing the model tree.

  • fieldOutputController (FieldOutputController) – The fieldput controlling object.

  • journal (Journal) – The journal object for logging.

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

applyAtIncrementStart(model, timeStep)[source]

Is called when a step increment starts.

Parameters
  • U_n – The current converged solution vector at start of the increment.

  • P – The current reaction force vector.

  • increment – The defintion of the time increment.

  • timeStep (TimeStep) –

applyAtStepEnd(model)[source]

Is called when a step successfully finished.

Parameters
  • U – The current solution vector.

  • P – The current reaction force vector.

applyAtStepStart(model)[source]

Is called when a step starts.

Parameters
  • U – The current solution vector.

  • P – The current reaction force vector.

updateStepAction(definition, jobInfo, model, fieldOutputController, dofmanager, journal)[source]

Is called when an updated definition is present for a new step.

Parameters
  • name – The name of this step action.

  • definition (dict) – A dictionary containing the options for this step action.

  • jobInfo (dict) – A dictionary containing the information about the job.

  • model (FEModel) – A dictionary containing the model tree.

  • fieldOutputController (FieldOutputController) – The fieldput controlling object.

  • journal (Journal) – The journal object for logging.