cratepy.online.crom.asca.HomResOutput

class HomResOutput(file_path)[source]

Bases: IncrementalOutputFile

Output file: Homogenized strain/stress results.

_file_path

Output file path.

Type:

str

_header

List containing the header of each column (str).

Type:

list[str]

_col_width

Output file column width.

Type:

int

init_file(self, strain_formulation)[source]

Open output file and write file header.

write_file(self, strain_formulation, problem_type, mac_load_path, hom_results, effective_time)[source]

Write output file.

Constructor.

Parameters:

file_path (str) – Output file path.

List of Public Methods

init_file

Open output file and write file header.

rewind_file

Rewind output file.

write_file

Write output file.

Methods

__init__(file_path)[source]

Constructor.

Parameters:

file_path (str) – Output file path.

init_file(strain_formulation)[source]

Open output file and write file header.

Parameters:

strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.

rewind_file(rewind_inc)

Rewind output file.

Parameters:

rewind_inc (int) – Increment associated with the rewind state.

write_file(strain_formulation, problem_type, mac_load_path, hom_results, effective_time)[source]

Write output file.

Parameters:
  • strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.

  • problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2), 2D axisymmetric (3) and 3D (4).

  • mac_load_path (LoadingPath) – Macroscale loading path.

  • hom_results (dict) –

    Homogenized strain/stress results stored as:

    • ’strain’ : homogenized strain tensor (numpy.ndarray (2d))

    • ’stress’ : homogenized stress tensor (numpy.ndarray (2d))

    • ’hom_stress_33’ : homogenized out-of-plain stress (float)

    Infinitesimal strain tensor and Cauchy stress tensor (infinitesimal strains) or Deformation gradient and first Piola-Kirchhoff stress tensor (finite strains).

  • effective_time (float) – Current time (s) associated with the solution of the equilibrium problem.