Skip to content

Commit 36146d6

Browse files
Update README.md and add ustruct test case. ustruct result is fairly different from struct result, so could not use result_002.vtu from the struct case
1 parent 7317db3 commit 36146d6

File tree

21 files changed

+558
-6
lines changed

21 files changed

+558
-6
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
This test case simulates a spatially variable Robin boundary condition on a slab of material described by the Guccione material model. Primary fibers run along the length of the slab (z-direction) and secondary fibers run across the width of the slab
1+
This test case simulates a spatially variable Robin boundary condition on a slab of material described by the Guccione material model. This case is identical to `ustruct/spatially_variable_robin`, except it uses `struct` physics.
2+
3+
- Primary fibers run along the length of the slab (z-direction) and secondary fibers run across the width of the slab
24
(x-direction).
35

4-
The slab is loaded on the +Y surface with a uniform pressure load. The load profile is a ramp to 10 dynes/cm^2 over 0.5 seconds, then held there until
6+
- The slab is loaded on the +Y surface with a uniform pressure load. The load profile is a ramp to 10 dynes/cm^2 over 0.5 seconds, then held there until
57
2 seconds. The load is defined in `load.dat`, which can be generated with
68
`generate_load.py`. The load tends to push the slab downward.
79

810
![Load Profile](load.png)
911

10-
This is resisted by a spatially varying Robin boundary condition on the -Y surface. The stiffness is 0 at z = 0, and 50 at the far end.
12+
- This is resisted by a spatially varying Robin boundary condition on the -Y surface. The stiffness is 0 at z = 0, and 50 at the far end.
1113

1214
![Spatially varying Robin BC](Y0_spatially_varying_robin.png)
1315

1416

15-
The slab is also constrained by Dirichlet boundary conditions on the +-X and +-Z
17+
- The slab is also constrained by Dirichlet boundary conditions on the +-X and +-Z
1618
surfaces, applied in the normal direction. These prevent the slab from moving
1719
in the x and z directions.
1820

19-
The resulting deformation is shown in the video below:
21+
- The resulting deformation is shown in the video below:
2022
![Deformation](animation.gif)
2123
The black outline shows the initial configuration. As you can see, the displacement of the slab is greatest at z = 0, where the Robin BC stiffness is zero. At the far end of the slab, the displacement is very little, where the stiffness is greatest. The oscillations are due to the absence of any damping in the Robin BC.
2224

25+
- Note, the deformation is fairly different from `ustruct/spatially_variable_robin`, like due to the different underlying physics formulation and the coarse mesh. Therefore, the `result_002.vtu` files are not identical.

tests/cases/struct/spatially_variable_robin/solver.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<GeneralSimulationParameters>
55
<Continue_previous_simulation> 0 </Continue_previous_simulation>
66
<Number_of_spatial_dimensions> 3 </Number_of_spatial_dimensions>
7-
<Number_of_time_steps> 2 </Number_of_time_steps>
7+
<Number_of_time_steps> 200 </Number_of_time_steps>
88
<Time_step_size> 0.01 </Time_step_size>
99
<Spectral_radius_of_infinite_time_step> 0.50 </Spectral_radius_of_infinite_time_step>
1010
<Searched_file_name_to_trigger_stop> STOP_SIM </Searched_file_name_to_trigger_stop>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
This test case simulates a spatially variable Robin boundary condition on a slab of material described by the Guccione material model. This case is identical to `struct/spatially_variable_robin`, except it uses `ustruct` physics.
2+
3+
- Primary fibers run along the length of the slab (z-direction) and secondary fibers run across the width of the slab
4+
(x-direction).
5+
6+
- The slab is loaded on the +Y surface with a uniform pressure load. The load profile is a ramp to 10 dynes/cm^2 over 0.5 seconds, then held there until
7+
2 seconds. The load is defined in `load.dat`, which can be generated with
8+
`generate_load.py`. The load tends to push the slab downward.
9+
10+
![Load Profile](load.png)
11+
12+
- This is resisted by a spatially varying Robin boundary condition on the -Y surface. The stiffness is 0 at z = 0, and 50 at the far end.
13+
14+
![Spatially varying Robin BC](Y0_spatially_varying_robin.png)
15+
16+
17+
- The slab is also constrained by Dirichlet boundary conditions on the +-X and +-Z
18+
surfaces, applied in the normal direction. These prevent the slab from moving
19+
in the x and z directions.
20+
21+
- The resulting deformation is shown in the video below:
22+
![Deformation](animation.gif)
23+
The black outline shows the initial configuration. As you can see, the displacement of the slab is greatest at z = 0, where the Robin BC stiffness is zero. At the far end of the slab, the displacement is very little, where the stiffness is greatest. The oscillations are due to the absence of any damping in the Robin BC.
24+
25+
- Note, the deformation is fairly different from `struct/spatially_variable_robin`, like due to the different underlying physics formulation and the coarse mesh. Therefore, the `result_002.vtu` files are not identical.
26+
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:5b7fae7ab8ac1ba68df93cb69d6e427a9151148ab4e608bef4763fe09fd26642
3+
size 6131
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:1e25dd76f4e87c6e84d8ac4311709e8869351d2aba525f238627d9e56a217733
3+
size 6777356
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import numpy as np
2+
import os
3+
4+
# Go to directory of this script
5+
os.chdir(os.path.dirname(os.path.realpath(__file__)))
6+
7+
# Number of timesteps and number of Fourier modes
8+
n_timesteps = 101
9+
n_modes = 64
10+
11+
# Generate time values from 0 to 2
12+
time = np.linspace(0, 2, n_timesteps)
13+
14+
# Generate ramp from 0 to 10 in 0.5 seconds, then hold until 2 seconds.
15+
load = np.zeros(n_timesteps)
16+
load[time < 0.5] = 10 * time[time < 0.5] / 0.5
17+
load[(time >= 0.5)] = 10
18+
19+
20+
# Write the time and stress values to a text file
21+
with open("load.dat", "w") as file:
22+
file.write(f"{n_timesteps} {n_modes}\n")
23+
for t, s in zip(time, load):
24+
file.write(f"{t:.3f} {s:.3f}\n")
25+
26+
# Plot the stress values
27+
import matplotlib.pyplot as plt
28+
plt.plot(time, load)
29+
plt.xlabel("Time (s)")
30+
plt.ylabel("Load (dynes/cm^2)")
31+
plt.title("Load")
32+
plt.savefig("load.png")

0 commit comments

Comments
 (0)