Coverage for pyrc \ validation \ plate \ comparison.py: 0%
22 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-13 16:59 +0200
1# -------------------------------------------------------------------------------
2# Copyright (C) 2026 Joel Kimmich, Tim Jourdan
3# ------------------------------------------------------------------------------
4# License
5# This file is part of PyRC, distributed under GPL-3.0-or-later.
6# ------------------------------------------------------------------------------
8# Script for validation
9#
10# Calculation of the dynamic solution of a semi-infinite plate
11#
12# Comparison
13#
14from pyrc.visualization.plot import LinePlot
15from pyrc.validation.plate.analytic import run_plate_analytic
16from pyrc.validation.plate.model import run_plate_model
18model_x, model_y, times, name_add_on = run_plate_model(False)
19analytic_x, analytic_y, _, _ = run_plate_analytic(False)
21plot = LinePlot(
22 x=model_x,
23 ys=model_y - analytic_y,
24 labels=[f"{float(t):.1f} s" for t in times],
25 y_title="Temperature-Delta / K",
26 x_title="Length / m",
27)
28plot.plot()
29plot.ax.set_xlim(left=0, right=model_x[-1])
30plot.fig.legend(loc="outside upper right", ncols=5)
31plot.save(
32 r"C:\Simulations\PyRC\debug\plate_comparison"
33 f"{name_add_on}.png"
34)
35plot.ax.set_xlim(left=0, right=model_x[-1])
36plot.ax.set_ylim(bottom=-0.05, top=0.05)
37plot.fig.legend(loc="outside upper right", ncols=5)
38plot.save(
39 r"C:\Simulations\PyRC\debug\plate_comparison2"
40 f"{name_add_on}.png"
41)
42plot.ax.set_xlim(left=0, right=0.2)
43plot.ax.set_ylim(bottom=-0.05, top=0.05)
44plot.fig.legend(loc="outside upper right", ncols=5)
45plot.save(
46 r"C:\Simulations\PyRC\debug\plate_comparison3"
47 f"{name_add_on}.png"
48)
49plot.ax.set_xlim(left=0, right=0.1)
50plot.ax.set_ylim(bottom=-0.05, top=0.05)
51plot.fig.legend(loc="outside upper right", ncols=5)
52plot.save(
53 r"C:\Simulations\PyRC\debug\plate_comparison4"
54 f"{name_add_on}.png"
55)