List only the S_VTK/E_VTK components that have data, and require the
complete tensor for the derived S/E results. Guard against too few
values in the tensor rows. Add tests for strain and partial data.
Read the VTK point data, not only "disp" (now found by name, not
position). "pressure" becomes the nodal pore pressure POR, other scalar
point arrays keep their name. OPM Flow writes them with
--vtk-write-geo-mech-nodal, recovered from its cell values.
Stress and strain are cell values in the simulator, so S and E at
element-nodal (and integration-point) position give every element corner
its cell's value. S is effective stress, tension positive, while OPM
writes total stress, compression positive: S = POR * I - stress at each
corner, so ST = -S + POR returns the simulator's stress exactly.
With S present, populateDerivedResultNames() returns true, so SE, ST,
principal stresses, SFI, DSM, FOS, NE etc. are available.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OPM Flow writes each symmetric tensor as three cell arrays
"stress[0]", "stress[1]", "stress[2]", the rows (Si1, Si2, Si3). The
reader took "stress[0]" as (S11, S22, S33) and "stress[1]" as
(S12, S13, S23), so S22, S33 and S13 held the wrong components and
"stress[2]" was ignored. Read the upper triangle from the three rows.
Coordinates are imported with z negated; S13/S23 and E13/E23 now
change sign with it, as U3 already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests cover readPoints/readDisplacements/readConnectivity/readProperties
in RifVtkImportUtil, and file open, step names, FEM part loading,
displacement reading, and field names in RifVtkReader.