feat(shell-surface-pressure-load): step 5 - integrate-nonlinear-follower-pressure

This commit is contained in:
KOKO\Mimi
2026-09-01 15:48:52 +09:00
parent ecbdc7dc49
commit 9b19cc1b18
5 changed files with 580 additions and 4 deletions
@@ -101,6 +101,38 @@ All, 1, 6
dsload + "*End Step\n";
}
std::string NonlinearShellDeck() {
return R"inp(*Part, name=ShellPart
*Node
1, 0., 0., 0.
2, 1., 0., 0.
3, 1., 1., 0.
4, 0., 1., 0.
*Element, type=S4
1, 1, 2, 3, 4
*Elset, elset=ShellSet
1
*Shell Section, elset=ShellSet, material=Steel
0.1
*End Part
*Assembly, name=Assembly
*Instance, name=Shell-1, part=ShellPart
*End Instance
*Nset, nset=All, instance=Shell-1
1, 2, 3, 4
*End Assembly
*Material, name=Steel
*Elastic
1000., 0.25
*Boundary
All, 1, 6
*Step, name=Step-1, nlgeom=YES
*Static
0.1, 1., 0.001, 0.1
*End Step
)inp";
}
} // namespace
TEST(ShellSurfacePressureApplication,
@@ -143,3 +175,21 @@ TEST(ShellSurfacePressureApplication,
0);
EXPECT_GE(H5Fclose(file), 0);
}
TEST(ShellSurfacePressureApplication,
InputWithoutPressureRetainsExistingNonlinearBehavior) {
TempDirectory directory{"nonlinear-no-pressure"};
const auto input = directory.Path() / "nonlinear-no-pressure.inp";
const auto output = directory.Path() / "nonlinear-no-pressure_results.h5";
WriteText(input, NonlinearShellDeck());
EXPECT_EQ(fesa::FesaApplication{}.Run({input.string()}), 0);
ASSERT_TRUE(std::filesystem::exists(output));
ASSERT_GT(H5Fis_hdf5(output.string().c_str()), 0);
const hid_t file =
H5Fopen(output.string().c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
ASSERT_GE(file, 0);
EXPECT_GT(H5Lexists(file, "/steps/Step-1/accepted_frames", H5P_DEFAULT), 0);
EXPECT_EQ(H5Lexists(file, "/surface_pressure", H5P_DEFAULT), 0);
EXPECT_GE(H5Fclose(file), 0);
}