Reporting

Text reports are generated from completed nusa.result.StaticResult snapshots. Reporting therefore reflects one specific solved analysis rather than mutable state on a model.

Quick usage

Print a report:

result = model.solve()
result.simple_report()

Return the report as a string:

report = result.simple_report(report_type="string")
print(report)

Write the report to a file:

result.simple_report(
    report_type="write",
    fname="analysis.txt",
)

The top-level function is equivalent:

from nusa import simple_report

report = simple_report(result, report_type="string")

Report contents

The simple report includes the major result categories available in StaticResult:

NODAL DISPLACEMENTS
APPLIED LOADS
NODAL FORCES (K @ U)
REACTIONS
ELEMENT RESULTS
FINITE ELEMENT MODEL INFO
NODES
ELEMENTS

Element-result columns are generated from the canonical element result names. For example, a bar report includes axial force/stress while a beam report includes shear forces and bending moments.

Why reporting is result-owned

In NuSA 0.4, a model can be changed and solved again while old results remain valid snapshots:

result1 = model.solve()
report1 = result1.simple_report(report_type="string")

model.add_force(node, (20.0,))
result2 = model.solve()

report1 continues to describe result1. It is not affected by the later model mutation.

This behavior is one of the reasons reporting consumes StaticResult rather than reading solved values from Node or Model.

API reference

Text reporting for NuSA analysis results.

nusa.reporting.simple_report(result, report_type='print', fname='nusa_rpt.txt')[source]

Generate a compact text report from a StaticResult.