Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7a473ae
adding new options for torque tube radius, sep. distance, and modules…
eyoung55 Sep 8, 2025
e5e8bb7
making panels differently, including torque tube standoff and discret…
eyoung55 Sep 8, 2025
b1f4f5e
ignore panel surfaces marked trash, add back in checks on bbox, add n…
eyoung55 Sep 8, 2025
185b1fe
change defaults for torque tube to zero to preserve old mesh behavior…
eyoung55 Sep 9, 2025
96672ad
clean up facet marking tests and revert to old meshing behavior if to…
eyoung55 Sep 9, 2025
bb62814
lower elevation by half panel thickness to coincide with new meshing …
eyoung55 Sep 9, 2025
90a7db6
change the box to span [0,2] in the z direction vs being 0 centered
eyoung55 Sep 9, 2025
251e117
update so that a panel's elevation is defined as the bottom of the pa…
eyoung55 Sep 9, 2025
9d77229
change dz to account for new panel position, change truth values to a…
eyoung55 Sep 9, 2025
ca9df00
change the location of the tracked corner acceleration consistent wit…
eyoung55 Sep 9, 2025
b6a5fd3
changing variable names from north_west to north_east
eyoung55 Sep 9, 2025
1929dc9
remove misleading comment
eyoung55 Sep 9, 2025
9b14d50
naive parsing to avoid issue of gha node name having underscore
eyoung55 Sep 10, 2025
d10aec8
save both acceleration and deformation in csv file, clean up unclear …
eyoung55 Sep 10, 2025
2a0a73a
change facets to vertices in variable name for clarity
eyoung55 Sep 10, 2025
a2033ed
only compare the deformation outputs (first two cols) during the chec…
eyoung55 Sep 10, 2025
65e0a1b
Merge branch 'dev' into torque-spring
eyoung55 Sep 10, 2025
2a18d4b
update the case study input
xinhe2205 Oct 23, 2025
5e9a2f9
implement structure simplification
Nov 7, 2025
64f4efc
dx and ds for modules and connectors
Nov 12, 2025
dc61252
new derivations without split the left fixed and right fixed part
Dec 16, 2025
3f764ec
fix bugs in the input file
Dec 16, 2025
5bbb1dd
fix initialization of total torque
Dec 19, 2025
527e082
fix the Assertion Error
xinhe2205 Dec 23, 2025
0681dd5
Initialize spring stiffness
xinhe2205 Dec 23, 2025
e5423e2
verified
Jan 7, 2026
25c1fd7
add lift and drag force calculation
Jan 8, 2026
f9a7622
Merge branch 'dev_wrap' into torque-spring
eyoung55 Jan 16, 2026
a970d9d
fix facet marker to make it compitile with previous geometry
xinhe2205 Jan 22, 2026
4a6a3eb
Merge branch 'torque-spring' of https://github.com/eyoung55/PVade int…
xinhe2205 Jan 22, 2026
95c6dc0
fix facet marker for original geometry
xinhe2205 Jan 22, 2026
f0298ee
add back the BCs for case without Robin BC and move the structure dow…
xinhe2205 Feb 2, 2026
e19d7b6
black format
xinhe2205 Feb 2, 2026
05b4d73
fix test mesh movement:
arswalid Feb 3, 2026
ac1fac5
reformatted files in examples
arswalid Feb 3, 2026
7b93766
Fix to test all input
arswalid Feb 3, 2026
0ce0bd0
removing -n 4 that was used to test locally back to n 1 for gh runners
arswalid Feb 3, 2026
02c2340
black formatting
arswalid Feb 3, 2026
264143b
fixing misspelled modules/module
arswalid Feb 4, 2026
7ad7580
black formatted latest changes
arswalid Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test_pvade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
shell: bash -l {0}
run: PYTHONPATH=. pytest -sv pvade/tests/
- name: test all inputs
env:
OMPI_MCA_regx: "naive"
shell: bash -l {0}
run: pytest -sv test_all_inputs.py

Expand Down
1 change: 0 additions & 1 deletion examples/cylinderflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from dolfinx.io import VTXWriter, gmshio, XDMFFile
from dolfinx.mesh import locate_entities_boundary


####################################################
# #
# MESH PARAMETERS #
Expand Down
1 change: 0 additions & 1 deletion examples/poissoneq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from timeit import default_timer as timer
from dolfinx.common import TimingType, list_timings


start = timer()
elems = int(sys.argv[1]) # nelems
# Create mesh and define function space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
"import pandas as pd # need this to load our data from the csv files\n",
"\n",
"import sys\n",
"\n",
"# NOTE: to run this, you will need to replace the path below #\n",
"sys.path.append('/Users/bstanisl/repos/pyconturb/pyconturb') # path to the pyconturb repository location on your local machine\n",
"sys.path.append(\n",
" \"/Users/bstanisl/repos/pyconturb/pyconturb\"\n",
") # path to the pyconturb repository location on your local machine\n",
"from pyconturb import gen_turb, gen_spat_grid # generate turbulence, useful helper\n",
"from pyconturb.sig_models import iec_sig # IEC 61400-1 turbulence std dev\n",
"from pyconturb.spectral_models import kaimal_spectrum # Kaimal spectrum\n",
"from pyconturb.wind_profiles import constant_profile, power_profile # wind-speed profile functions\n",
"from pyconturb.wind_profiles import (\n",
" constant_profile,\n",
" power_profile,\n",
") # wind-speed profile functions\n",
"\n",
"from _nb_utils import plot_slice\n",
"import h5py"
Expand Down Expand Up @@ -217,11 +223,13 @@
"source": [
"# generate spatial gridpoints dataframe\n",
"ny = 80\n",
"nz = 80 #40\n",
"nz = 80 # 40\n",
"y = np.linspace(-10.0, 10.0, ny)\n",
"z = np.linspace(0.00001, 20.0, nz) \n",
"z = np.linspace(0.00001, 20.0, nz)\n",
"\n",
"spat_df = gen_spat_grid(y, z) # if `comps` not passed in, assumes all 3 components are wanted\n",
"spat_df = gen_spat_grid(\n",
" y, z\n",
") # if `comps` not passed in, assumes all 3 components are wanted\n",
"spat_df.head() # look at the first few rows"
]
},
Expand All @@ -233,9 +241,9 @@
"outputs": [],
"source": [
"# generate time vector\n",
"t_final = 1.0 #10.0 [s]\n",
"dt = 0.01 # [s]\n",
"t_steps = int(t_final/dt)\n",
"t_final = 1.0 # 10.0 [s]\n",
"dt = 0.01 # [s]\n",
"t_steps = int(t_final / dt)\n",
"time = np.linspace(0, t_final, t_steps)"
]
},
Expand Down Expand Up @@ -483,16 +491,30 @@
"source": [
"# reshape to 3D array and visualize first timestep\n",
"data = {}\n",
"data['u'] = turb_df.filter(regex='u').values.reshape(len(turb_df),y.size,z.size).transpose((0, 2, 1))\n",
"data['v'] = turb_df.filter(regex='v').values.reshape(len(turb_df),y.size,z.size).transpose((0, 2, 1))\n",
"data['w'] = turb_df.filter(regex='w').values.reshape(len(turb_df),y.size,z.size).transpose((0, 2, 1))\n",
"data[\"u\"] = (\n",
" turb_df.filter(regex=\"u\")\n",
" .values.reshape(len(turb_df), y.size, z.size)\n",
" .transpose((0, 2, 1))\n",
")\n",
"data[\"v\"] = (\n",
" turb_df.filter(regex=\"v\")\n",
" .values.reshape(len(turb_df), y.size, z.size)\n",
" .transpose((0, 2, 1))\n",
")\n",
"data[\"w\"] = (\n",
" turb_df.filter(regex=\"w\")\n",
" .values.reshape(len(turb_df), y.size, z.size)\n",
" .transpose((0, 2, 1))\n",
")\n",
"\n",
"fig, ax = plt.subplots()\n",
"plt.imshow(data['u'][0,:,:], # imshow requires nz-ny slice\n",
" origin='lower', # smallest y-z in lower left, not upper left\n",
" extent=[y[0], y[-1], z[0], z[-1]], # lateral and vertical limits\n",
" interpolation='bilinear',\n",
" cmap='coolwarm') # image smoothing\n",
"plt.imshow(\n",
" data[\"u\"][0, :, :], # imshow requires nz-ny slice\n",
" origin=\"lower\", # smallest y-z in lower left, not upper left\n",
" extent=[y[0], y[-1], z[0], z[-1]], # lateral and vertical limits\n",
" interpolation=\"bilinear\",\n",
" cmap=\"coolwarm\",\n",
") # image smoothing\n",
"plt.colorbar()"
]
},
Expand All @@ -507,24 +529,24 @@
"h5_filename = \"pct_turb_ny{}_nz{}_unconstrained_{}s_dt{}_uref{}.h5\".format(\n",
" ny, nz, t_final, dt, u_ref\n",
")\n",
"with h5py.File(\"../../input/\"+h5_filename, \"w\") as fp:\n",
"with h5py.File(\"../../input/\" + h5_filename, \"w\") as fp:\n",
" fp.create_dataset(\"time_index\", shape=(t_steps,))\n",
" fp[\"time_index\"][:] = time\n",
" \n",
"\n",
" fp.create_dataset(\"y_coordinates\", shape=(ny,))\n",
" fp[\"y_coordinates\"][:] = y\n",
" \n",
"\n",
" fp.create_dataset(\"z_coordinates\", shape=(nz,))\n",
" fp[\"z_coordinates\"][:] = z\n",
" \n",
"\n",
" fp.create_dataset(\"u\", shape=(t_steps, nz, ny))\n",
" fp[\"u\"][:] = data['u'][:]\n",
" \n",
" fp[\"u\"][:] = data[\"u\"][:]\n",
"\n",
" fp.create_dataset(\"v\", shape=(t_steps, nz, ny))\n",
" fp[\"v\"][:] = data['v'][:]\n",
" \n",
" fp[\"v\"][:] = data[\"v\"][:]\n",
"\n",
" fp.create_dataset(\"w\", shape=(t_steps, nz, ny))\n",
" fp[\"w\"][:] = data['w'][:]"
" fp[\"w\"][:] = data[\"w\"][:]"
]
},
{
Expand All @@ -551,7 +573,7 @@
"source": [
"# read h5 file\n",
"# Note: Replace the path below with the path on your local machine to the .h5 file that you want to read\n",
"fname = '/Users/bstanisl/Documents/repos/PVade/input/pct_turb_ny80_nz80_unconstrained_1.0s_dt0.01_uref20.h5'\n",
"fname = \"/Users/bstanisl/Documents/repos/PVade/input/pct_turb_ny80_nz80_unconstrained_1.0s_dt0.01_uref20.h5\"\n",
"\n",
"# Open the file (read-only)\n",
"with h5py.File(fname, \"r\") as f:\n",
Expand Down
12 changes: 11 additions & 1 deletion input/duramat_case_study.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ pv_array:
elevation: 2.1
tracker_angle: 0.0
span_fixation_pts: [13.2]
# torque_tube_separation: 0.2 # gap between panel and tube center
# torque_tube_outer_radius: 0.1 # radius of the torque tube
# torque_tube_inner_radius: 0.09 # radius of the torque tube
modules_per_span: 1
fixed_location: 1 # fixed location of the panel along the span (from 0 (fixed at left) to modules_per_span (fixed at right))
block_chord_div_by_panel_chord: 0.02

solver:
dt: 0.01
t_final: 20.0
Expand Down Expand Up @@ -58,4 +65,7 @@ structure:
bc_list: []
motor_connection: true
tube_connection: true
beta_relaxation: 0.5
beta_relaxation: 0.5
elasticity_modulus_tube: 2.0e+11
poissons_ratio_tube: 0.3
rho_tube: 7800.0
2 changes: 1 addition & 1 deletion input/flag2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ structure:
body_force_x: 0
body_force_y: 0
body_force_z: 0 #100
bc_list: ["left"]
bc_list: ["panel_left"]
motor_connection: False
tube_connection: False
beta_relaxation: 0.005
Expand Down
2 changes: 1 addition & 1 deletion input/heated_panels2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ structure:
body_force_x: 0
body_force_y: -1
body_force_z: 0 #100
bc_list: ["left"]
bc_list: ["panel_left"]
motor_connection: False
tube_connection: False
beta_relaxation: 0.005
Expand Down
2 changes: 1 addition & 1 deletion input/inflow_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ structure:
body_force_x: 0
body_force_y: 0
body_force_z: 0 #100
bc_list: ["left"]
bc_list: ["panel_left"]
motor_connection: False
tube_connection: False
beta_relaxation: 0.005
Expand Down
2 changes: 1 addition & 1 deletion input/panels2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ structure:
body_force_x: 0
body_force_y: -1
body_force_z: 0 #100
bc_list: ["top"]
bc_list: [panel_top]
motor_connection: False
tube_connection: False
beta_relaxation: 0.005
Expand Down
2 changes: 1 addition & 1 deletion input/panels3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ structure:
body_force_x: 0
body_force_y: 0
body_force_z: -1 #100
bc_list: [left ]
bc_list: [panel_left]
tube_connection: False
60 changes: 57 additions & 3 deletions pvade/IO/input_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ properties:
minimum: 0.0
maximum: 10.0
type: "number"
description: "The vertical distance between the center of the panel and the ground."
description: "The vertical distance between the center of the torque tube and the ground."
units: "meter"
stream_spacing:
default: 7.0
Expand All @@ -154,7 +154,7 @@ properties:
units: "meter"
span_fixation_pts:
default: 3.5
minimum: 1.0
minimum: 0.2
# maximum: 32.0
type:
- "number"
Expand Down Expand Up @@ -198,6 +198,39 @@ properties:
be unrolled such that tracking_angle_0 is applied to the panel at (x_min, y_min), tracking_angle_1 is applied to the panel at
(x_min + x_spacing, y_min), etc., i.e., x-major direction. If argument is a single value, that tracking angle will be applied to the every panel."
units: "degree"
torque_tube_separation:
default: 0.0
minimum: 0.0
maximum: 1.0
type: "number"
description: "The distance between the bottom of the panel structure and the centerline of the torque tube, in meters."
torque_tube_outer_radius:
default: 0.0
minimum: 0.0
maximum: 1.0
type: "number"
description: "The radius of the torque tube, in meters."
torque_tube_inner_radius:
default: 0.0
minimum: 0.0
maximum: 1.0
type: "number"
description: "The radius of the torque tube, in meters."
modules_per_span:
default: 1
minimum: 1
type: "integer"
description: "The number of modules/panels per every panel_span distance. This can be thought of as the number of modules/panels per each table, counted in the spanwise direction only (i.e., 2-in-portait systems should report only the number in the spanwise direction, vs 2x that value)."
fixed_location:
default: 5
type: "integer"
description: "If an integer between 0 and modules_per_span, indicates the fixed location"
block_chord_div_by_panel_chord:
default: 0.1
minimum: 0.01
type: "number"
description: "block length or width divided by panel chord"

solver:
additionalProperties: false
type: "object"
Expand Down Expand Up @@ -617,7 +650,7 @@ properties:
type: "boolean"
description: "Controls whether or not a boundary condition is applied along the lines defined by the spanwise fixation points which run in the streamwise direction and divide the panel into multiple rectangles in the spanwise direction."
bc_list:
default: [front,back]
default: []#[panel_front,panel_back]
# type: "list"
description: "location for clamped boundary conditions"
dt:
Expand Down Expand Up @@ -648,6 +681,27 @@ properties:
type: "number"
description: "poissons ratio of the panel structure."
units: "None"
elasticity_modulus_tube:
default: 200.0e+9
minimum: 1.0e+2
maximum: 500.0e+9
type: "number"
description: "The effective Young's modulus of the torque tube."
units: "Pascal"
poissons_ratio_tube:
default: 0.3
minimum: 0.1
maximum: 0.9
type: "number"
description: "poissons ratio of the torque tube."
units: "None"
rho_tube:
default: 1.0
# minimum: 0.001
# maximum: 1000.0
type: "number"
description: "The density of the structure."
units: "kg/meter^3"
body_force_x:
default: 100
type: "number"
Expand Down
Loading
Loading