genericROM.Containers.OnlineData.OnlineDataMechanical

class OnlineDataMechanical(solutionName, nReducedIntegrationPoints, numberOfSigmaComponents)[source]

Bases: Mordicus.Containers.OnlineData.OnlineDataBase.OnlineDataBase

Class containing an OnlineDataMechanical, used in the online stage to store quantities required for the tracking of certain quantites, e.g. the internal state variable at the reduced integration points, required to compute the constitutive law.

nReducedIntegrationPoints

number of reduced integration points

Type

int

numberOfSigmaComponents

number number of second order tensor components

Type

int

strain0

of size (nReducedIntegrationPoints,numberOfSigmaComponents) strain tensor at reduced integration points, at the beginning of the current time step iteration

Type

np.ndarray

strain1

of size (nReducedIntegrationPoints,numberOfSigmaComponents) strain tensor at reduced integration points, at the end of the current time step iteration

Type

np.ndarray

stress1

of size (nReducedIntegrationPoints,numberOfSigmaComponents) stress tensor at reduced integration points, at the end of the current time step iteration

Type

np.ndarray

temperature0

of size (nReducedIntegrationPoints,) temperature at reduced integration points, at the beginning of the current time step iteration

Type

1D np.ndarray

temperature1

of size (nReducedIntegrationPoints,) temperature at reduced integration points, at the end of the current time step iteration

Type

1D np.ndarray

stateVar0

with keys the material tags strings, and values np.ndarray of size (localNbReducedIntegPoints,nstatv) state variable at local reduced integration points (for current material), at the beginning of the current time step iteration

Type

dict

stateVar1

with keys the material tags strings, and values np.ndarray of size (localNbReducedIntegPoints,nstatv) state variable at local reduced integration points (for current material), at the end of the current time step iteration

Type

dict

dualVarOutputNames

with keys the material tags strings, and values lists of str, containing the name of the dual variables chosen for output, and to be reconstructed

Type

dict

dualVarOutput

with keys the material tags strings, and values dicts with keys time step, and values np.ndarray of size (localNbReducedIntegPoints, 2*numberOfSigmaComponents+nstatv), containing the values of the strain and stress tensors and the state variables for the current material and the current time step

Type

dict

indicesOfReducedIntegPointsPerMaterial

with keys the material tags strings, and values 1D np.ndarray, the ranks of integration points

Type

dict

GetDualVarOutput(tag)[source]

Get the GetDualVarOutput attribute associated to the material with tag “tag”

Returns

dualVarOutput[tag], with keys time step, and values np.ndarray of size (localNbReducedIntegPoints,2*numberOfSigmaComponents+nstatv)

Return type

dict

GetDualVarOutputNames(tag)[source]

Get the dualVarOutputNames attribute associated to the material with tag “tag”

Returns

dualVarOutputNames[tag], list of str

Return type

list

GetIndicesOfReducedIntegPointsPerMaterial()[source]

Get the indicesOfReducedIntegPointsPerMaterial attribute

Returns

indicesOfReducedIntegPointsPerMaterial, with keys the material tags strings, and values 1D np.ndarray, the ranks of integration points

Return type

dict

GetNReducedIntegrationPoints()[source]

Get the nReducedIntegrationPoints attribute

Returns

nReducedIntegrationPoints

Return type

int

GetNumberOfSigmaComponents()[source]

Get the numberOfSigmaComponents attribute

Returns

numberOfSigmaComponents

Return type

int

GetStateVarAtReducedIntegrationPoints0(tag)[source]

Get the stateVar0 attribute

Returns

with keys the material tags strings, and values np.ndarray of size (localNbReducedIntegPoints,nstatv)

Return type

dict

GetStateVarAtReducedIntegrationPoints1(tag)[source]

Get the stateVar1 attribute

Returns

with keys the material tags strings, and values np.ndarray of size (localNbReducedIntegPoints,nstatv)

Return type

dict

GetStrainAtReducedIntegrationPoints0()[source]

Get the strain0 attribute

Returns

strain0, of size (nReducedIntegrationPoints,numberOfSigmaComponents)

Return type

np.ndarray

GetStrainAtReducedIntegrationPoints1()[source]

Get the strain1 attribute

Returns

strain1, of size (nReducedIntegrationPoints,numberOfSigmaComponents)

Return type

np.ndarray

GetStressAtReducedIntegrationPoints1()[source]

Get the stress1 attribute

Returns

stress1, of size (nReducedIntegrationPoints,numberOfSigmaComponents)

Return type

np.ndarray

GetTemperatureAtReducedIntegrationPoints0()[source]

Get the temperature0 attribute

Returns

of size (nReducedIntegrationPoints,)

Return type

1D np.ndarray

GetTemperatureAtReducedIntegrationPoints1()[source]

Get the temperature1 attribute

Returns

of size (nReducedIntegrationPoints,)

Return type

1D np.ndarray

InitializeMaterial(tag, var, nstatv, localNbReducedIntegPoints)[source]

Initializes stateVar1, dualVarOutputNames and dualVarOutput attribute for a material with tag “tag”

Parameters
  • tag (str) – tag of the material to be initialized

  • var (lists of str) – containing the name of the dual variables chosen for output, and to be reconstructed

  • nstatv (int) – number of state variables of the material to be initialized

  • localNbReducedIntegPoints (int) – number of reduced integration points that have been selected among the integration points in elements from the material to be added

SetDualStateAndVarOutput(tag, time, strain, stress, statev)[source]

Sets stateVar1 and dualVarOutput (at time “time”) for material “tag”. Is called at the end of each Newton iteration. Last value is kept at convergence.

Parameters
  • tag (str) – tag of the material whose data is updated

  • time (float) – time step when dualVarOutput is set

  • strain (np.ndarray) – of size (localNbReducedIntegPoints,numberOfSigmaComponents) strain tensor at local reduced integration points of material “tag”

  • stress (np.ndarray) – of size (localNbReducedIntegPoints,numberOfSigmaComponents) stress tensor at local reduced integration points of material “tag”

  • statev (np.ndarray) – of size (localNbReducedIntegPoints,numberOfSigmaComponents) state variable at local reduced integration points of material “tag”

SetIndicesOfReducedIntegPointsPerMaterial(indicesOfReducedIntegPointsPerMaterial)[source]

Sets the indicesOfReducedIntegPointsPerMaterial attribute

Parameters

indicesOfReducedIntegPointsPerMaterial (dict) – with keys the material tags strings, and values 1D np.ndarray, the ranks of integration points

SetStateVarAtReducedIntegrationPoints1(tag, localStateVar1)[source]

Sets the stateVar1 attribute associated to the material with tag “tag”

Parameters
  • tag (int) – tag of the material

  • localStateVar1 (np.ndarray) – of size (localNbReducedIntegPoints,nstatv)

SetStrainAtLocalReducedIntegrationPoints1(localStrain1, intPoints)[source]

Sets the strain1 attribute at certain reduced integration points

Parameters
  • localStrain1 (np.ndarray) – of size (localNbReducedIntegPoints,numberOfSigmaComponents)

  • intPoints (1D np.ndarray) – of size (localNbReducedIntegPoints,)

SetStrainAtReducedIntegrationPoints0(strain0)[source]

Sets the strain0 attribute

Parameters

strain0 (np.ndarray) – of size (nReducedIntegrationPoints,numberOfSigmaComponents)

SetStrainAtReducedIntegrationPoints1(strain1)[source]

Sets the strain1 attribute

Parameters

strain1 (np.ndarray) – of size (nReducedIntegrationPoints,numberOfSigmaComponents)

SetStressAtLocalReducedIntegrationPoints1(localStress1, intPoints)[source]

Sets the stress1 attribute at certain reduced integration points

Parameters
  • localStress1 (np.ndarray) – of size (localNbReducedIntegPoints,numberOfSigmaComponents)

  • intPoints (1D np.ndarray) – of size (localNbReducedIntegPoints,)

SetStressAtReducedIntegrationPoints1(stress1)[source]

Sets the stress1 attribute

Parameters

stress1 (np.ndarray) – of size (nReducedIntegrationPoints,numberOfSigmaComponents)

UpdateInternalStateAtReducedIntegrationPoints(time)[source]

Updates the internal state of all the materials at the reduced integration points, and at time step value “time”

Parameters

time (float) – time step value at which the internal state is updated

UpdateTemperatureAtReducedIntegrationPoints(temperatureAtReducedIntegrationPoints0, temperatureAtReducedIntegrationPoints1)[source]

Updates the temperature fields at the reduced integration points, at the beginning and at the end of the current time step iteration

Parameters
  • temperatureAtReducedIntegrationPoints0 (1D np.ndarray) – of size (nReducedIntegrationPoints,) temperature at reduced integration points, at the beginning of the current time step iteration

  • temperatureAtReducedIntegrationPoints1 (1D np.ndarray) – of size (nReducedIntegrationPoints,) temperature at reduced integration points, at the end of the current time step iteration