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

New feature: apply external forces to the system at runtime #125

Merged
merged 29 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
77e90b0
Merge branch 'develop' into dev_external_forces
ArturoMS13 Mar 17, 2021
7f51d11
remove prefix form environment
ArturoMS13 Mar 17, 2021
ad5210b
cleanup
ArturoMS13 Mar 17, 2021
6f359c2
wip
ArturoMS13 Mar 23, 2021
8ce9947
simplify and fix jonswap
ArturoMS13 Mar 31, 2021
d933fa8
include jonswap in the interface and use scipy interp1d
ArturoMS13 Mar 31, 2021
bbc0a88
typo
ArturoMS13 Mar 31, 2021
64e3ba6
Merge branch 'dev_wave_spectrum' into dev_external_forces
ArturoMS13 Mar 31, 2021
e058c26
syntax fixes
ArturoMS13 Mar 31, 2021
fa73da5
fix and comment test
ArturoMS13 Mar 31, 2021
56ef744
undo bad fix
ArturoMS13 Mar 31, 2021
ded15e9
fix dimensions
ArturoMS13 Mar 31, 2021
1d03bb2
fix tolerance and move test to test folder
ArturoMS13 Apr 1, 2021
7dca652
merge develop (checks needed)
ArturoMS13 Apr 5, 2021
845eda8
extra changes from merge
ArturoMS13 Apr 6, 2021
7a0e6e3
extra changes merge
ArturoMS13 Apr 6, 2021
ea3bbaf
update environments
ArturoMS13 Apr 6, 2021
cbab86c
remove .value dynamiccoupled
ArturoMS13 Apr 6, 2021
9e191ea
include ctype
ArturoMS13 Apr 6, 2021
058b9c2
recover disappeared centre rot stepuvlm
ArturoMS13 Apr 6, 2021
5d6ef38
Merge branch 'dev_external_forces' of https://github.com/ImperialColl…
ArturoMS13 Apr 6, 2021
41f5113
normalise jonswap (omega freq)
ArturoMS13 Apr 7, 2021
e9493eb
fix wave interpolation
ArturoMS13 Apr 15, 2021
104e941
fix syntax wave forces
ArturoMS13 Apr 15, 2021
e956943
fix k=0 dynamiccoupled
ArturoMS13 Apr 15, 2021
e08cb34
refactor [dynamic coupled]: convergence criteria
sduess Apr 15, 2021
1d64ffa
refactor: remove duplicate code
sduess Apr 15, 2021
503cd9d
remove [floatingforces]: unused parameters
sduess Apr 15, 2021
1ca13cf
update develop uvlm
ArturoMS13 Apr 21, 2021
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
379 changes: 316 additions & 63 deletions cases/templates/template_wt.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/UVLM
6 changes: 5 additions & 1 deletion sharpy/aero/utils/uvlmlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def vlm_solver(ts_info, options):
flightconditions.uinf_direction = np.ctypeslib.as_ctypes(ts_info.u_ext[0][:, 0, 0]/flightconditions.uinf)

p_rbm_vel_g = options['rbm_vel_g'].ctypes.data_as(ct.POINTER(ct.c_double))
p_centre_rot_g = options['centre_rot_g'].ctypes.data_as(ct.POINTER(ct.c_double))

ts_info.generate_ctypes_pointers()
run_VLM(ct.byref(vmopts),
Expand All @@ -177,7 +178,8 @@ def vlm_solver(ts_info, options):
ts_info.ct_p_gamma,
ts_info.ct_p_gamma_star,
ts_info.ct_p_forces,
p_rbm_vel_g)
p_rbm_vel_g,
p_centre_rot_g)
ts_info.remove_ctypes_pointers()


Expand Down Expand Up @@ -266,6 +268,7 @@ def uvlm_solver(i_iter, ts_info, struct_ts_info, options, convect_wake=True, dt=
rbm_vel[0:3] = np.dot(struct_ts_info.cga(), rbm_vel[0:3])
rbm_vel[3:6] = np.dot(struct_ts_info.cga(), rbm_vel[3:6])
p_rbm_vel = rbm_vel.ctypes.data_as(ct.POINTER(ct.c_double))
p_centre_rot = options['centre_rot'].ctypes.data_as(ct.POINTER(ct.c_double))

i = ct.c_uint(i_iter)
ts_info.generate_ctypes_pointers()
Expand All @@ -281,6 +284,7 @@ def uvlm_solver(i_iter, ts_info, struct_ts_info, options, convect_wake=True, dt=
ts_info.ct_p_zeta_star,
ts_info.ct_p_zeta_dot,
p_rbm_vel,
p_centre_rot,
ts_info.ct_p_gamma,
ts_info.ct_p_gamma_star,
ts_info.ct_p_dist_to_orig,
Expand Down
Loading