genericROM.Containers.Loadings.Temperature module

class Temperature(solutionName, set)[source]

Bases: LoadingBase

Class containing a Loading of type temperature for mechanical problems.

fieldsMapTimes

time values on which filed maps values are provided

Type:

np.ndarray or list of floats

fieldsMapValues

filed maps values at the corresponding time values

Type:

np.ndarray or list of str

fields

dictionary with temperature vectors tags (str) keys and temperature vectors (np.ndarray of size (numberOfNodes,)) at integration points as values

Type:

dict

fieldsAtReducedIntegrationPoints

dictionary with temperature vectors tags (str) keys and temperature vectors (np.ndarray of size (numberOfReducedIntegPoints,)) at reduced integration points as values

Type:

dict

phiAtReducedIntegPoint

of size (numberOfReducedIntegPoints,numberOfNodes) containing the finite element basis functions evaluated at the reduced integration points, so that the temperature fields at reduced integration points are obtained by phiAtReducedIntegPoint.dot(field)

Type:

scipy.sparse matrix

areFieldsTreated

True: field have been treated (fields extracted when multiple fields defined in one vector), and scalar have been converted to scalar fields False; not treated

Type:

bool

ComputeContributionToReducedExternalForces(time)[source]

Computes and returns the reduced external forces contribution of the loading, which is zero for temperature loadings

Parameters:

time (float)

Return type:

GetTemperatureAtReducedIntegrationPointsAtTime(time)[source]

Computes and returns the temperature at reduced integration points and at time, using PieceWiseLinearInterpolation

Parameters:

time (float)

Returns:

of size (numberOfReducedIntegPoints,), temperature at reduced integration points and at time

Return type:

np.ndarray

GetTemperatureAtTime(time, numberOfNodes)[source]

Computes and returns the temperature at time, using PieceWiseLinearInterpolation

Parameters:

time (float)

Returns:

of size (numberOfNodes,), temperature at nodes and at time

Return type:

np.ndarray

PreReduceLoading(mesh, operatorCompressionData, integrationRule=<Muscat.FE.IntegrationRules.MeshQuadrature object>)[source]

Prepares ReduceLoading by setting phiAtReducedIntegPoint

Parameters:
  • mesh (Muscat.Containers.Mesh) – mesh of the high-fidelity model

  • operatorCompressionData (OperatorCompressionDataMechanical) – data structure generated by the operator compression for Mechanical problems

ReduceLoading(mesh, problemData=None, reducedOrderBases=None, operatorCompressionData=None, integrationRule=<Muscat.FE.IntegrationRules.MeshQuadrature object>)[source]

Computes and sets the reduced representation of the loading

Parameters:
  • mesh (Muscat.Containers.Mesh) – mesh of the high-fidelity model

  • problemData (ProblemData) – problemData containing the loading

  • reducedOrderBases (dict(str: np.ndarray)) – dictionary with solutionNames (str) as keys and reducedOrderBases (np.ndarray of size (numberOfModes, numberOfDOFs)) as values

  • operatorCompressionData (dict(str: custom_data_structure)) – dictionary with solutionNames (str) as keys and data structure generated by the operator compression step as values

SetFields(fields)[source]

Sets fields

Parameters:

fields (dict) – dictionary with temperature vectors tags (str) keys and temperature vectors (np.ndarray of size (numberOfNodes,)) at integration points as values

SetFieldsMap(fieldsMapTimes, fieldsMapValues)[source]

Sets fieldsMapTimes and fieldsMapValues

Parameters:

fieldsMapTimes (np.ndarray or list of floats) – time values on which filed maps values are provided fieldsMapValues : np.ndarray or list of str filed maps values at the corresponding time values

TreatFields(numberOfNodes)[source]

Extract fields when multiple fields defined in one vector), and scalar have been converted to scalar fields. Only when self.areFieldsTreated == False, then converts self.areFieldsTreated to True

Parameters:

numberOfNodes (int) – Number of the nodes in which the temperature fields are defined

UpdateLoading(loading)[source]

Update the high-dimensional data of the temperature loading, from another temperature loading

Parameters:

loading (Temperature)