Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to specify the inflow velocity profile type #60

Open
wants to merge 115 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
0df7970
updating gitignore
brookeslawski Jun 6, 2024
53e4e93
working first version of uniform and parabolic inflow velocity profile
brookeslawski Jun 11, 2024
b751341
working loglaw velocity profile
brookeslawski Jun 11, 2024
1725ca6
black formatting one file
eyoung55 Jun 13, 2024
d2c781b
change time_varying_inflow_bc (a bool) to time_varying_inflow_window …
eyoung55 Jun 13, 2024
f06f136
move test for ramp_window outside inflow cases, clean up printing to …
eyoung55 Jun 13, 2024
46d6729
change default on z0 from 0.01 to 0.05, make time_varying_inflow_wind…
eyoung55 Jun 13, 2024
7aaebc2
new var names for tests, specify loglaw for panel test, specify parab…
eyoung55 Jun 13, 2024
48c9127
testing all the input files
brookeslawski Jun 18, 2024
dc2f20c
adding regression test to test that all files in input/ folder run
brookeslawski Jun 27, 2024
3c843b0
changes to enable assertion-based pass/fail to reg test
brookeslawski Jun 27, 2024
016280e
2d input file tests still failing
brookeslawski Jul 11, 2024
a6cc13a
Merge branch 'dev' into feature/velprofinput
arswalid Oct 7, 2024
eec0a7b
pulling to address push error
brookeslawski Nov 18, 2024
dfefbbf
fixing pytest
arswalid Sep 30, 2024
0d42baa
save the lift_z force (integrated force in z-dir) for 3d
eyoung55 Sep 24, 2024
8fab0ba
rename lift and drag to fy and fz, resp, for consistency
eyoung55 Oct 7, 2024
abf386f
update lift drag truth values to use fx fy 0 ordering
eyoung55 Oct 7, 2024
dfe5583
make consistent name changes to lift/drag -> fy/fx
eyoung55 Oct 7, 2024
b149980
fix typo in variable name
eyoung55 Oct 7, 2024
c0f5895
Create mountain_shape.geo
xinhe2205 Dec 15, 2023
55b1284
Update mountain_shaope.geo
xinhe2205 Dec 21, 2023
de2b041
add the gmsh code for fake mountain shape.
Feb 2, 2024
68c1a6e
add features to subtract flat box
Feb 2, 2024
ed25efb
black formatting 2x files
eyoung55 Feb 27, 2024
334edd5
add a fixed mesh for solve repeatability
eyoung55 Mar 28, 2024
a8f26a0
don't write file since it will be written during build (as part of wr…
eyoung55 Mar 28, 2024
4555453
specify flag2d mesh dir in test, assert lift and drag matching
eyoung55 Mar 28, 2024
54d3f84
Update test_solve.py
arswalid Oct 7, 2024
393cac7
black formatting
arswalid Oct 7, 2024
57e98cc
fix black formatting, use typo-free assertion line
eyoung55 Oct 7, 2024
c17fe5d
Copy over Cylinder Flow example
Jun 17, 2024
1d9c4c8
Organize code by section
Jun 17, 2024
f1c779d
Obstacle and fluid fused - uniform mesh
Jun 18, 2024
a608f8d
Add disk mesh separate from fluid
Jun 18, 2024
010e193
Benchmark move mesh (#1)
melilly Jun 21, 2024
85f280c
Move mesh in two directions periodically
Jun 24, 2024
f8057ff
Just write total mesh displacement
Jun 24, 2024
5a81199
Print mesh every time
Jun 24, 2024
e93676b
Un-generalize mesh dimension
Jun 24, 2024
69c461a
Write into a single file
Jun 24, 2024
c57d5f4
Re-re-generalize mesh order
Jun 24, 2024
9a53ca0
Reasonable y oscillation using dt
Jun 25, 2024
bb2ae31
Demo reasonable disk movement in x & y direction
Jun 25, 2024
29b3888
Output u again
Jun 25, 2024
0034e5d
Reassemble matrices every step
Jun 25, 2024
367933a
Separate disk velocity and displacement
Jun 25, 2024
62f0a46
(not working) try at updating noslip boundary condition
Jun 25, 2024
61c8dc6
merging disp based solution with melissa's vel based one, adding ALE …
eyoung55 Jun 26, 2024
75a6d8c
Reorganize code
Jun 26, 2024
60218de
Use mesh velocity instead of mesh displacement
Jun 26, 2024
139b983
Tried to fix bc. made mesh comically worse
Jun 27, 2024
9a9cd19
BC working with velocity
Jun 27, 2024
80eeb45
Copy cylinder flow into two files
Jul 1, 2024
07c78b4
Uniform inflow
Jul 10, 2024
1888784
Move cylinder only vertically
Jul 10, 2024
713b5d0
Change wall noslip bc to slip
Jul 10, 2024
82263f4
Change disk and tube sizes
Jul 10, 2024
c30d57a
Reduce input parameters
Jul 10, 2024
0a4a423
Disk stationary to replicate Strouhal frequency
Jul 10, 2024
f7e8ea3
make the time step bigger, save only at interval, skip mesh movement …
eyoung55 Jul 11, 2024
3e60258
Add in estimate of strouhal frequency
Jul 11, 2024
852151d
save a csv of lift and drag data for post processing
eyoung55 Jul 11, 2024
b85aa6e
Split timestepping into a higher resolution later on
Jul 11, 2024
0acb684
k (the constant-object dt) must be updated in loop with dt, add new c…
eyoung55 Jul 12, 2024
cc943ae
add placeholder gif `vortex_shedding.gif`
eyoung55 Jul 12, 2024
2f28732
testing an mp4 file `mesh_with_bc.mp4`
eyoung55 Jul 12, 2024
0d45437
update gif
eyoung55 Jul 12, 2024
e130db9
Update vortex shedding
Jul 17, 2024
51032d4
Output y shift and start forced oscillations
Jul 25, 2024
df6b364
Add plotting files for csv output, comparing to 2008 paper
Jul 25, 2024
29a14f4
Plot all graphs on one window
Jul 29, 2024
dbc7dcc
Double the height to match corrected paper
Jul 29, 2024
1d5f128
Save figure
Jul 30, 2024
7fc93ed
the ALE velocity should probably be consistent with the timestepping …
eyoung55 Jul 31, 2024
f756262
Set output folder in one place
Jul 31, 2024
167dbad
Output drag & lift coefficients to compare to (Placzek 2009) fig 12
Aug 6, 2024
c5b1655
Delete duplicate file
Aug 16, 2024
50d9eec
Black formatting
Aug 16, 2024
90f9009
initial heliostat run
brookeslawski May 9, 2024
f78f9bf
modifying fixation lines to match crescent dunes heliostat
brookeslawski May 24, 2024
09e454a
committing before merging velprofinput feature
brookeslawski Jul 19, 2024
e5a1881
input files for heliostat wind speed study
brookeslawski Aug 27, 2024
ebfa28c
adding run script for heliostat example
brookeslawski Aug 27, 2024
f366520
adding heliostat 3d example documentation
brookeslawski Aug 27, 2024
c040f37
adding animation to docs
brookeslawski Sep 11, 2024
121c59d
removing unnecessary files for demo
brookeslawski Sep 11, 2024
d6fbadc
removing more files for demo
brookeslawski Sep 11, 2024
3586f7b
removing more files for demo
brookeslawski Sep 11, 2024
0842ae8
oops one more to remove
brookeslawski Sep 11, 2024
bdfe1ee
reverting panels3d DomainCreation, adding heliostats3d file
brookeslawski Sep 30, 2024
4e45e61
creating heliostats3d module similar to panels3d
brookeslawski Sep 30, 2024
bc704b4
cleanup
brookeslawski Sep 30, 2024
05df1d5
black formatting
brookeslawski Sep 30, 2024
37b09a5
black formatting
brookeslawski Sep 30, 2024
d6a56f0
improving extraction of displacement from corner of panel
brookeslawski Oct 11, 2024
17aefbe
black formatting
brookeslawski Oct 11, 2024
ca3e0a7
remove duplicate tech-ref at top level
eyoung55 Oct 21, 2024
d197eeb
fixing black format and pytest error
arswalid Oct 29, 2024
5da293e
adding function spaces
brookeslawski Nov 6, 2024
62562d8
recording updates to temp_fixes_panel.py in this branch, to be merged…
brookeslawski Nov 6, 2024
69b6581
changed from rho,mu to nu form of momentum eq to match pvade
brookeslawski Nov 6, 2024
ffee8b3
adding buoyancy term to mom eq for temperature
brookeslawski Nov 6, 2024
df3aae2
adding temperature boundary conditions
brookeslawski Nov 7, 2024
eb1d1ce
adding temperature BCs, input file, input schema, and changing stepch…
brookeslawski Nov 7, 2024
88ce449
thermal_analysis additions
brookeslawski Nov 7, 2024
c4ab294
added buoyancy term, ndim updates for 2d 3d issues, running without e…
brookeslawski Nov 8, 2024
fb6e490
changed numbering of equations and solvers
brookeslawski Nov 8, 2024
a541784
adding eq 4, adv diffusion equation for temperature, runs but solutio…
brookeslawski Nov 9, 2024
66b94d2
advect diffusion eq added, running properly, also added nonuniform te…
brookeslawski Nov 11, 2024
f175a24
added Peclet number calculation
brookeslawski Nov 11, 2024
e4920a0
added supg stabilization to be applied based on Pe number
brookeslawski Nov 12, 2024
1886b81
enabling multi-row simulation in panels2d with temperature
brookeslawski Nov 15, 2024
817fd0d
running in realistic dimensions
brookeslawski Nov 15, 2024
ffe949a
getting full dimensions working
brookeslawski Nov 18, 2024
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
*.pyc
*.egg-info/

*.xdmf
*.h5

docs/_build/
results/
111 changes: 111 additions & 0 deletions Gmsh_code/demo/demo_elipsoidal_shape_concave_surface.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//+
SetFactory("OpenCASCADE");

/* create whole box domain */
Box(1) = {0, 0, 0, 50, 100, 50};

/* create surface on ground (shape shaded by the hill) */

nx = 10;
ny = 10;

// create all points at front line

p_f = newp;
For I In {0:nx}
x = 10+I*30/nx;
y = 30+(20^2-20^2/15^2*(x-25)^2)^0.5;
z = 0;
Point(p_f+I) = {x,y,z,1};
EndFor

// create all points at rear line

p_b = newp;
For I In {0:nx-2}
x = 10+(I+1)*30/nx;
y = 30-(20^2-20^2/15^2*(x-25)^2)^0.5;
z = 0;
Point(p_b+I) = {x,y,z,1};
EndFor

// create curves at front of bottom surface

l_b_f = newc;
For I In {0:nx-1}
Line(l_b_f+I) = {p_f+I, p_f+I+1};
EndFor

// create curves at back of bottom surface

l_b_b = newc;
Line(l_b_b) = {p_f, p_b};
For I In {1:nx-2}
Line(l_b_b+I) = {p_b+I-1, p_b+I};
EndFor
Line(l_b_b+nx-1) = {p_b+nx-2, p_f+nx};


// create curve loop

cl_b = newcl;
Curve Loop(cl_b) = {l_b_f:l_b_f+nx-1, -l_b_b-nx+1:-l_b_b};
// create bottom surface
s_b = news;
Surface(s_b) = {cl_b};

/* create mountain surface */

p_s = newp;
For I In {1:nx-1}
x = 10+I*30/nx;
For J In {1:ny-1}

// create point for each x

y = 30-(20^2-20^2/15^2*(x-25)^2)^0.5+2*(20^2-20^2/15^2*(x-25)^2)^0.5/ny*J;
z = 20*(1-(x-25)^2/15^2-(y-30)^2/20^2)^0.5;
Point(p_s+(ny-1)*(I-1)+J-1) = {x,y,z,1};
EndFor
EndFor

l_s = newc;

For I In {1:nx-1}
For J In {1:ny-1}
If (J == 1)
BSpline(l_s+ny*(I-1)) = {p_b+I-1, p_s+(ny-1)*(I-1)+J-1};
Else
BSpline(l_s+ny*(I-1)+J-1) = {p_s+(ny-1)*(I-1)+J-2, p_s+(ny-1)*(I-1)+J-1};
EndIf
EndFor
BSpline(l_s+ny*(I-1)+ny-1) = {p_s+(ny-1)*(I-1)+ny-2, p_f+I};
EndFor

cl_s = newcl;
For I In {1:nx-1}
If (I == 1)
Curve Loop(cl_s) = {-l_b_b, l_b_f, -l_s-ny*(I-1)-ny+1:-l_s-ny*(I-1)};
Else
Curve Loop(cl_s+I-1) = {l_s+ny*(I-2):l_s+ny*(I-2)+ny-1, l_b_f+I-1, -(l_s+ny*(I-1)+ny-1):-(l_s+ny*(I-1)), -l_b_b-I+1};
EndIf
EndFor

Curve Loop(cl_s+nx-1) = {l_b_f+nx-1, -l_b_b-nx+1, l_s+ny*(nx-2):l_s+ny*(nx-2)+ny-1};

s_s = news;
For I In {0:nx-1}
Printf('%g', I);
Surface(s_s+I) = {cl_s+I};
EndFor

/* create mountain volume */

sl_s = newsl;
Surface Loop(sl_s) = {s_b, s_s:s_s+nx-1};
v_m = newv;
Volume(v_m) = {sl_s};

/* subtract the mountain volume from the whole domain */

BooleanDifference{ Volume{1}; Delete; }{ Volume{v_m}; Delete; }
165 changes: 165 additions & 0 deletions Gmsh_code/demo/demo_elipsoidal_shape_triangle_surface.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
//+
SetFactory("OpenCASCADE");

/* Define parameters */

nx = 20;
ny = 20;

x_min = 10;
x_max = 40;

y_center = 30;

/* create points on mountain */

p_left = newp;
Point(p_left) = {x_min, y_center, 0};

p_center = newp;

For I In {1:nx-1}
For J In {0:ny}
x = x_min+(x_max-x_min)/nx*I;
y = 30-(20^2-20^2/15^2*(x-25)^2)^0.5+2*(20^2-20^2/15^2*(x-25)^2)^0.5/ny*J;
If (1-(x-25)^2/15^2-(y-30)^2/20^2<0)
z = 0;
Else
z = 20*(1-(x-25)^2/15^2-(y-30)^2/20^2)^0.5;
EndIf
Point(p_center+(ny+1)*(I-1)+J) = {x, y, z};
EndFor
EndFor

p_right = newp;
Point(p_right) = {x_max, y_center, 0};

/* Create surface of mountain */

// create lines along y-axis at different x locations

line_ver = newc;

For I In {1:nx-1}
For J In {0:ny-1}
Line(line_ver+ny*(I-1)+J) = {p_center+(ny+1)*(I-1)+J, p_center+(ny+1)*(I-1)+J+1};
EndFor
EndFor

// create lines at most left surface (connect p_left with p_center+0....p_center+ny)

line_left = newc;
For J In {0:ny}
Line(line_left+J) = {p_left, p_center+J};
EndFor

// create curve loops at most left surface

cl_left = newcl;
For J In {0:ny-1}
Curve Loop(cl_left+J) = {line_left+J, line_ver+J, -line_left-J-1};
EndFor

// create most left surfaces

s_left = news;
For J In {0:ny-1}
Surface(s_left+J) = {cl_left+J};
EndFor

// create lines at center surfaces

line_center = newc;
For I In {1:nx-2}
For J In {0:2*ny}
If (J%2==0)
Line(line_center+(2*ny+1)*(I-1)+J) = {p_center+(ny+1)*(I-1)+J/2, p_center+(ny+1)*(I)+J/2};
Else
Line(line_center+(2*ny+1)*(I-1)+J) = {p_center+(ny+1)*(I-1)+(J+1)/2, p_center+(ny+1)*(I)+(J-1)/2};
EndIf
EndFor
EndFor

// create line loop at center surfaces

cl_center_left = newcl;
For I In {1:nx-2}
For J In {0:ny-1}
Curve Loop(cl_center_left+ny*(I-1)+J) = {line_ver+ny*(I-1)+J, line_center+(2*ny+1)*(I-1)+2*J+1, -(line_center+(2*ny+1)*(I-1)+2*J)};
EndFor
EndFor

s_center_left = news;
For I In {1:nx-2}
For J In {0:ny-1}
Surface(s_center_left+ny*(I-1)+J) = {cl_center_left+ny*(I-1)+J};
EndFor
EndFor


cl_center_right = newcl;
For I In {1:nx-2}
For J In {0:ny-1}
Curve Loop(cl_center_right+ny*(I-1)+J) = {line_center+(2*ny+1)*(I-1)+2*J+1, line_ver+ny*(I)+J, -(line_center+(2*ny+1)*(I-1)+2*J+2)};
EndFor
EndFor

s_center_right = news;
For I In {1:nx-2}
For J In {0:ny-1}
Surface(s_center_right+ny*(I-1)+J) = {cl_center_right+ny*(I-1)+J};
EndFor
EndFor

// create lines at most right surface

line_right = newc;
For J In {0:ny}
Line(line_right+J) = {p_right, p_center+(ny+1)*(nx-2)+J};
EndFor

// create curve loops at most right surface

cl_right = newcl;
For J In {0:ny-1}
Curve Loop(cl_right+J) = {line_right+J, line_ver+ny*(nx-2)+J, -line_right-J-1};
EndFor

// create most right surfaces

s_right = news;
For J In {0:ny-1}
Surface(s_right+J) = {cl_right+J};
EndFor

// create bottom surface
/*
Printf('%g', line_left);
Printf('%g', line_center);
Printf('%g', line_center+(2*ny+1)*(nx-3));
Printf('%g', -line_right);
Printf('%g', line_right+ny);
Printf('%g', -(line_center+(2*ny+1)*(nx-3)+2*ny));
Printf('%g', -(line_center+2*ny));
Printf('%g', -line_left-ny);
*/


cl_bottom = newcl;
Curve Loop(cl_bottom) = {line_left, line_center:line_center+(2*ny+1)*(nx-3):2*ny+1, -line_right, line_right+ny, -(line_center+(2*ny+1)*(nx-3)+2*ny):-(line_center+2*ny):2*ny+1, -line_left-ny};

s_bottom = news;
Surface(s_bottom) = {cl_bottom};

// create mountain volume

sc_mountain = news;
Surface Loop(sc_mountain) = {s_bottom, s_left:s_left+ny-1, s_center_left:s_center_left+ny*(nx-2-1)+ny-1, s_center_right:s_center_right+ny*(nx-2-1)+ny-1, s_right:s_right+ny-1};
v_m = newv;
Volume(v_m) = {sc_mountain};

/* create whole box domain */
v_m_box = newv;
Box(v_m_box) = {0, 0, 0, 50, 100, 50};

BooleanDifference{ Volume{v_m_box}; Delete; }{ Volume{v_m}; Delete; }
Loading