Add loading pattern plotting script and update manuscript

- Introduced a new Python script `plot_load_patterns.py` to visualize loading pattern displacement histories from `LoadPatterns.csv`, generating figures in PNG, SVG, and PDF formats. - Removed the outdated `PatronesCarga.csv` file as it is no longer needed. - Revised the abstract and various sections of the manuscript to enhance clarity and detail, including the introduction of radial basis function surrogates and adjustments to the optimization methodology. - Updated references in the bibliography to include new citations for SciPy and Differential Evolution.
parent 7c430ea6
Time (s),Displacement H30 (mm),Displacement H45 (mm),Displacement H60 (mm)
0,0,0,0
0.0625,12,16,20
0.125,0,0,0
0.1875,-12,-16,-16
0.25,0,0,0
0.3125,12,16,16
0.375,0,0,0
0.4375,-12,-16,-16
0.5,0,0,0
0.5625,25,32,32
0.625,0,0,0
0.6875,-25,-32,-32
0.75,0,0,0
0.8125,25,32,32
0.875,0,0,0
0.9375,-25,-32,-32
1,0,0,0
1.0625,38,48,48
1.125,0,0,0
1.1875,-38,-48,-48
1.25,0,0,0
1.3125,38,48,48
1.375,0,0,0
1.4375,-38,-48,-48
1.5,0,0,0
1.5625,50,64,64
1.625,0,0,0
1.6875,-50,-64,-64
1.75,0,0,0
1.8125,50,64,64
1.875,0,0,0
1.9375,-50,-64,-64
2,0,0,0
2.0625,60,75,75
2.125,0,0,0
2.1875,-60,-75,-75
2.25,0,0,0
2.3125,60,75,75
2.375,0,0,0
2.4375,-60,-75,-75
2.5,0,0,0
2.5625,70,85,85
2.625,0,0,0
2.6875,-70,-85,-85
2.75,0,0,0
2.8125,70,85,85
2.875,0,0,0
2.9375,-70,-85,-85
3,0,0,0
"""
Plot the loading pattern displacement histories.
The script reads LoadPatterns.csv and saves a single-panel figure as PNG, SVG,
and PDF using the same visual format as the FEM validation plots.
"""
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
plt.rcParams.update(
{
"font.family": "serif",
"font.serif": ["Times New Roman", "DejaVu Serif"],
"mathtext.fontset": "stix",
"font.size": 11,
"axes.labelsize": 11,
"axes.titlesize": 11,
"xtick.labelsize": 11,
"ytick.labelsize": 11,
"axes.linewidth": 0.7,
"axes.spines.top": False,
"axes.spines.right": False,
"figure.dpi": 300,
"savefig.dpi": 300,
}
)
COLORS = ["#1a6faf", "#E07060", "#4D9A57"]
COLOR_GRID = "#d8d8d8"
X_LABEL = "Time (s)"
Y_LABEL = "Displacement (mm)"
SERIES_LABELS = ["H30", "H45", "H60"]
def load_loading_patterns(path):
data = np.genfromtxt(path, delimiter=",", skip_header=1)
if data.ndim != 2 or data.shape[1] != 4:
raise ValueError(f"{path.name} must contain four numeric columns.")
return data[:, 0], data[:, 1:]
def style_axis(ax):
ax.grid(True, color=COLOR_GRID, linewidth=0.55, alpha=0.75)
ax.tick_params(axis="both", which="major", direction="in", length=4, width=0.7)
ax.tick_params(axis="both", which="minor", direction="in", length=2.5, width=0.6)
ax.minorticks_on()
def save_figure_all_formats(fig, out_base):
fig.savefig(f"{out_base}.png", format="png", bbox_inches="tight", dpi=300)
fig.savefig(f"{out_base}.svg", format="svg", bbox_inches="tight")
fig.savefig(f"{out_base}.pdf", format="pdf", bbox_inches="tight")
def main():
base_dir = Path(__file__).resolve().parent
time, displacements = load_loading_patterns(base_dir / "LoadPatterns.csv")
fig, ax = plt.subplots(figsize=(5.2, 3.8))
fig.subplots_adjust(left=0.14, right=0.985, bottom=0.28, top=0.94)
for index, label in enumerate(SERIES_LABELS):
ax.plot(
time,
displacements[:, index],
color=COLORS[index],
linewidth=1.6,
label=label,
)
ax.axhline(0, color="black", linewidth=0.55, alpha=0.65)
ax.set_xlabel(X_LABEL)
ax.set_ylabel(Y_LABEL)
ax.set_xlim(time.min(), time.max())
style_axis(ax)
handles, labels = ax.get_legend_handles_labels()
fig.legend(
handles,
labels,
loc="lower center",
ncol=3,
frameon=False,
framealpha=0.95,
edgecolor="#cccccc",
bbox_to_anchor=(0.5, 0.055),
)
output_base = base_dir / "LoadPatterns"
save_figure_all_formats(fig, output_base)
plt.close(fig)
print(f"Saved: {output_base}.png/.svg/.pdf")
if __name__ == "__main__":
main()
Tiempo [s],Desplazamiento H30 [mm],Desplazamiento H45 [mm]
0,0,0
0.0625,12,16
0.125,0,0
0.1875,-12,-16
0.25,0,0
0.3125,12,16
0.375,0,0
0.4375,-12,-16
0.5,0,0
0.5625,25,32
0.625,0,0
0.6875,-25,-32
0.75,0,0
0.8125,25,32
0.875,0,0
0.9375,-25,-32
1,0,0
1.0625,38,48
1.125,0,0
1.1875,-38,-48
1.25,0,0
1.3125,38,48
1.375,0,0
1.4375,-38,-48
1.5,0,0
1.5625,50,64
1.625,0,0
1.6875,-50,-64
1.75,0,0
1.8125,50,64
1.875,0,0
1.9375,-50,-64
2,0,0
2.0625,60,75
2.125,0,0
2.1875,-60,-75
2.25,0,0
2.3125,60,75
2.375,0,0
2.4375,-60,-75
2.5,0,0
2.5625,70,85
2.625,0,0
2.6875,-70,-85
2.75,0,0
2.8125,70,85
2.875,0,0
2.9375,-70,-85
3,0,0
...@@ -765,4 +765,31 @@ steel from coupon test results available. First, the theory of metal plasticity ...@@ -765,4 +765,31 @@ steel from coupon test results available. First, the theory of metal plasticity
howpublished = {Standard, American Society of Civil Engineers}, howpublished = {Standard, American Society of Civil Engineers},
} }
@Article{Virtanen2025,
author = {Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and Haberland, Matt and Reddy, Tyler and Cournapeau, David and Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and Bright, Jonathan and {van der Walt}, St{\'e}fan J. and Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and Kern, Robert and Larson, Eric and Carey, C J and Polat, {\.I}lhan and Feng, Yu and Moore, Eric W. and {VanderPlas}, Jake and Laxalde, Denis and Perktold, Josef and Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and Harris, Charles R. and Archibald, Anne M. and Ribeiro, Ant{\^o}nio H. and Pedregosa, Fabian and {van Mulbregt}, Paul and {SciPy 1.0 Contributors}},
title = {{{SciPy} 1.0: Fundamental Algorithms for Scientific Computing in Python}},
journal = {Nature Methods},
year = {2020},
volume = {17},
pages = {261--272},
doi = {10.1038/s41592-019-0686-2},
}
@Article{Storn1997,
author = {Storn, Rainer and Price, Kenneth},
journal = {Journal of Global Optimization},
title = {Differential {Evolution} – {A} {Simple} and {Efficient} {Heuristic} for global {Optimization} over {Continuous} {Spaces}},
year = {1997},
issn = {1573-2916},
month = dec,
number = {4},
pages = {341--359},
volume = {11},
abstract = {A new heuristic approach for minimizing possiblynonlinear and non-differentiable continuous spacefunctions is presented. By means of an extensivetestbed it is demonstrated that the new methodconverges faster and with more certainty than manyother acclaimed global optimization methods. The newmethod requires few control variables, is robust, easyto use, and lends itself very well to parallelcomputation.},
doi = {10.1023/A:1008202821328},
keywords = {evolution strategy, genetic algorithm, global optimization, nonlinear optimization, Stochastic optimization},
language = {en},
urldate = {2026-05-13},
}
@Comment{jabref-meta: databaseType:bibtex;} @Comment{jabref-meta: databaseType:bibtex;}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment