JFM-Notebooks / Experimental_Dataset / no_flow / wavemaker_program / 3rd_order_straight_solitary_wave.ipynb
3482 views unlisted
ubuntu2204Kernel: Python 3 (ipykernel)
In [1]:
In [2]:
Define some constant values
- gravity (determines units)
- still water depth
- target wave amplitude
P997 - timestep between paddle moves in ms (typically 20)
In [3]:
Out[3]:
80 32
Define functions for solitary wave form (3rd order following Grimshaw)
starting from physical quantites (denoted with tilde), we can define some useful paramaters: and where the subscript naught indicates a constant value. Then, for convienence, we define:
and take and as some spatial and temporal offset, if needed, to write
then finally retrieve the free surface elevation
and the depth averaged flow velocity
In [4]:
Determine the total time for the paddle movement
also determine offset the arrival time of the soliton so that the paddle velocity is initially zero
In [5]:
Check the wave form
In [6]:
Out[6]:
Text(0.5, 1.0, 'shape of solitary flow velocity at $x=0$')
Prepare subroutine for integrating paddle motion
In [7]:
Integrate paddle motion
In [8]:
Check the paddle motion
In [9]:
Out[9]:
Text(0.5, 1.0, 'paddle velocity vs paddle position')
Check some paddle motion properties
In [10]:
Out[10]:
the total paddle stroke is: 126.85768307446855 mm
the max paddle velocity is: 298.4388936093947 mm/s
the initial paddle velocity is: 0.23612944148864606 mm/s
the final paddle velocity is: 0.11730780284657663 mm/s
In [11]:
Finally, write out the motion control programs
the motion control program for paddles 1 through 8
In [12]:
the motion control program for paddles 9 through 16
In [13]:
Verify file output
In [14]:
Out[14]:
; WAVE TYPE - 3rd Order Solitary Wave
; GRAVITATION CONSTANT - 9810
; WATER DEPTH - 80
; TARGET AMPLITUDE - 32
; FILE A
; GENERATION DATE - Jul-31-2023
;
CLOSE
DELETE GATHER
DELETE TRACE
; M7024 = 1 turns off the TTL from output 1
M7024=1
; assign motors and scaling to coordinate system
&1 A
; in this case, all motors have the same motion, assign all to X
; to prevent motor motion, simply comment out the assigment
; 1 inch is 50,000 counts therefore 1mm is 1968.50393700787 counts
; the units of X,Y,Z,U,V,W,A,B depend on the scaling defined here
#1->1968.503937X
#2->1968.503937X
#3->1968.503937X
#4->1968.503937X
#5->1968.503937X
#6->1968.503937X
#7->1968.503937X
#8->1968.503937X
; redefine motion program 2
OPEN PROG 2 CLEAR
P997=10
HOMEZ1..8
ABS
LINEAR
TS0
TA1000
TM5000
DWELL5000
PVT(P997)
; M7024=0 will turn on the TTL signal from output 1
M7024=0
; define motion like X(position):(velocity)
X(0.000000):(0.236129)
X(0.002531):(0.266208)
X(0.005387):(0.300338)
X(0.008608):(0.338838)
X(0.012243):(0.382267)
X(0.016343):(0.431254)
X(0.020969):(0.486509)
X(0.026187):(0.548829)
X(0.032074):(0.619116)
X(0.038715):(0.698383)
X(0.046205):(0.787772)
X(0.054654):(0.888566)
X(0.064184):(1.002213)
X(0.074933):(1.130340)
X(0.087056):(1.274774)
X(0.100727):(1.437575)
X(0.116143):(1.621050)
X(0.133527):(1.827797)
X(0.153126):(2.060726)
X(0.175223):(2.323103)
X(0.200131):(2.618587)
X(0.228205):(2.951277)
X(0.259844):(3.325754)
X(0.295495):(3.747139)
X(0.335660):(4.221145)
X(0.380900):(4.754138)
X(0.431847):(5.353202)
X(0.489207):(6.026199)
X(0.553768):(6.781847)
X(0.626414):(7.629782)
X(0.708127):(8.580630)
X(0.800006):(9.646080)
X(0.903271):(10.838937)
X(1.019276):(12.173187)
X(1.149526):(13.664037)
X(1.295682):(15.327945)
X(1.459580):(17.182625)
X(1.643240):(19.247035)
X(1.848881):(21.541315)
X(2.078929):(24.086707)
X(2.336029):(26.905405)
X(2.623058):(30.020372)
X(2.943123):(33.455080)
X(3.299573):(37.233202)
X(3.695993):(41.378222)
X(4.136204):(45.912987)
X(4.624252):(50.859192)
X(5.164394):(56.236804)
X(5.761077):(62.063433)
X(6.418912):(68.353664)
X(7.142640):(75.118358)
X(7.937088):(82.363932)
X(8.807125):(90.091631)
X(9.757602):(98.296800)
X(10.793292):(106.968163)
X(11.918818):(116.087120)
X(13.138574):(125.627084)
X(14.456645):(135.552867)
X(15.876716):(145.820172)
X(17.401976):(156.375237)
X(19.035025):(167.154698)
X(20.777773):(178.085759)
X(22.631353):(189.086722)
X(24.596030):(200.067938)
X(26.671131):(210.933196)
X(28.854986):(221.581504)
X(31.144888):(231.909186)
X(33.537080):(241.812178)
X(36.026762):(251.188360)
X(38.608122):(259.939779)
X(41.274387):(267.974642)
X(44.017894):(275.208954)
X(46.830177):(281.567788)
X(49.702061):(286.986159)
X(52.623767):(291.409550)
X(55.585019):(294.794171)
X(58.575150):(297.107013)
X(61.583216):(298.325796)
X(64.598098):(298.438894)
X(67.608615):(297.445263)
X(70.603626):(295.354441)
X(73.572138):(292.186592)
X(76.503418):(287.972587)
X(79.387095):(282.754059)
X(82.213275):(276.583373)
X(84.972642):(269.523421)
X(87.656569):(261.647148)
X(90.257210):(253.036756)
X(92.767594):(243.782523)
X(95.181692):(233.981234)
X(97.494481):(223.734260)
X(99.701973):(213.145381)
X(101.801233):(202.318466)
X(103.790364):(191.355161)
X(105.668477):(180.352747)
X(107.435637):(169.402287)
X(109.092791):(158.587153)
X(110.641684):(147.981993)
X(112.084771):(137.652106)
X(113.425119):(127.653213)
X(114.666309):(118.031530)
X(115.812342):(108.824086)
X(116.867553):(100.059203)
X(117.836519):(91.757087)
X(118.723983):(83.930485)
X(119.534785):(76.585381)
X(120.273792):(69.721711)
X(120.945846):(63.334087)
X(121.555709):(57.412530)
X(122.108022):(51.943186)
X(122.607272):(46.909034)
X(123.057759):(42.290559)
X(123.463576):(38.066391)
X(123.828595):(34.213890)
X(124.156455):(30.709675)
X(124.450555):(27.530091)
X(124.714056):(24.651602)
X(124.949886):(22.051124)
X(125.160740):(19.706291)
X(125.349093):(17.595654)
X(125.517208):(15.698839)
X(125.667148):(13.996639)
X(125.800788):(12.471081)
X(125.919829):(11.105446)
X(126.025807):(9.884271)
X(126.120110):(8.793320)
X(126.203988):(7.819546)
X(126.278564):(6.951033)
X(126.344845):(6.176941)
X(126.403737):(5.487431)
X(126.456048):(4.873602)
X(126.502502):(4.327417)
X(126.543746):(3.841637)
X(126.580356):(3.409752)
X(126.612848):(3.025916)
X(126.641681):(2.684892)
X(126.667262):(2.381987)
X(126.689955):(2.113009)
X(126.710086):(1.874209)
X(126.727940):(1.662243)
X(126.743774):(1.474129)
X(126.757816):(1.307208)
X(126.770268):(1.159113)
X(126.781308):(1.027737)
X(126.791097):(0.911205)
X(126.799776):(0.807849)
X(126.807471):(0.716189)
X(126.814292):(0.634905)
X(126.820339):(0.562829)
X(126.825699):(0.498922)
X(126.830451):(0.442260)
X(126.834663):(0.392024)
X(126.838396):(0.347488)
X(126.841705):(0.308006)
X(126.844639):(0.273005)
X(126.847239):(0.241979)
X(126.849543):(0.214476)
X(126.851586):(0.190097)
X(126.853396):(0.168488)
X(126.855000):(0.149334)
X(126.856423):(0.132356)
X(126.857683):(0.117308)
DWELL15000 ; dwell time in ms
; M7024 = 1 turns off the TTL from output 1
M7024=1
LINEAR
TA100
TS0
TM1000
; Comment below to prevent paddles moving back to zero after dwelling
X0
CLOSE
CLOSE
In [15]:
Out[15]:
; WAVE TYPE - 3rd Order Solitary Wave
; GRAVITATION CONSTANT - 9810
; WATER DEPTH - 80
; TARGET AMPLITUDE - 32
; FILE B
; GENERATION DATE - Jul-31-2023
;
CLOSE
DELETE GATHER
DELETE TRACE
; assign motors and scaling to coordinate system
&2 A
; in this case, all motors have the same motion, assign all to X
; to prevent motor motion, simply comment out the assigment
; 1 inch is 50,000 counts therefore 1mm is 1968.50393700787 counts
; the units of X,Y,Z,U,V,W,A,B depend on the scaling defined here
#9->1968.503937X
#10->1968.503937X
#11->1968.503937X
#12->1968.503937X
#13->1968.503937X
#14->1968.503937X
#15->1968.503937X
#16->1968.503937X
; redefine motion program 3
OPEN PROG 3 CLEAR
P997=10
HOMEZ9..16
ABS
LINEAR
TS0
TA1000
TM5000
DWELL5000
PVT(P997)
; define motion like X(position):(velocity)
X(0.000000):(0.236129)
X(0.002531):(0.266208)
X(0.005387):(0.300338)
X(0.008608):(0.338838)
X(0.012243):(0.382267)
X(0.016343):(0.431254)
X(0.020969):(0.486509)
X(0.026187):(0.548829)
X(0.032074):(0.619116)
X(0.038715):(0.698383)
X(0.046205):(0.787772)
X(0.054654):(0.888566)
X(0.064184):(1.002213)
X(0.074933):(1.130340)
X(0.087056):(1.274774)
X(0.100727):(1.437575)
X(0.116143):(1.621050)
X(0.133527):(1.827797)
X(0.153126):(2.060726)
X(0.175223):(2.323103)
X(0.200131):(2.618587)
X(0.228205):(2.951277)
X(0.259844):(3.325754)
X(0.295495):(3.747139)
X(0.335660):(4.221145)
X(0.380900):(4.754138)
X(0.431847):(5.353202)
X(0.489207):(6.026199)
X(0.553768):(6.781847)
X(0.626414):(7.629782)
X(0.708127):(8.580630)
X(0.800006):(9.646080)
X(0.903271):(10.838937)
X(1.019276):(12.173187)
X(1.149526):(13.664037)
X(1.295682):(15.327945)
X(1.459580):(17.182625)
X(1.643240):(19.247035)
X(1.848881):(21.541315)
X(2.078929):(24.086707)
X(2.336029):(26.905405)
X(2.623058):(30.020372)
X(2.943123):(33.455080)
X(3.299573):(37.233202)
X(3.695993):(41.378222)
X(4.136204):(45.912987)
X(4.624252):(50.859192)
X(5.164394):(56.236804)
X(5.761077):(62.063433)
X(6.418912):(68.353664)
X(7.142640):(75.118358)
X(7.937088):(82.363932)
X(8.807125):(90.091631)
X(9.757602):(98.296800)
X(10.793292):(106.968163)
X(11.918818):(116.087120)
X(13.138574):(125.627084)
X(14.456645):(135.552867)
X(15.876716):(145.820172)
X(17.401976):(156.375237)
X(19.035025):(167.154698)
X(20.777773):(178.085759)
X(22.631353):(189.086722)
X(24.596030):(200.067938)
X(26.671131):(210.933196)
X(28.854986):(221.581504)
X(31.144888):(231.909186)
X(33.537080):(241.812178)
X(36.026762):(251.188360)
X(38.608122):(259.939779)
X(41.274387):(267.974642)
X(44.017894):(275.208954)
X(46.830177):(281.567788)
X(49.702061):(286.986159)
X(52.623767):(291.409550)
X(55.585019):(294.794171)
X(58.575150):(297.107013)
X(61.583216):(298.325796)
X(64.598098):(298.438894)
X(67.608615):(297.445263)
X(70.603626):(295.354441)
X(73.572138):(292.186592)
X(76.503418):(287.972587)
X(79.387095):(282.754059)
X(82.213275):(276.583373)
X(84.972642):(269.523421)
X(87.656569):(261.647148)
X(90.257210):(253.036756)
X(92.767594):(243.782523)
X(95.181692):(233.981234)
X(97.494481):(223.734260)
X(99.701973):(213.145381)
X(101.801233):(202.318466)
X(103.790364):(191.355161)
X(105.668477):(180.352747)
X(107.435637):(169.402287)
X(109.092791):(158.587153)
X(110.641684):(147.981993)
X(112.084771):(137.652106)
X(113.425119):(127.653213)
X(114.666309):(118.031530)
X(115.812342):(108.824086)
X(116.867553):(100.059203)
X(117.836519):(91.757087)
X(118.723983):(83.930485)
X(119.534785):(76.585381)
X(120.273792):(69.721711)
X(120.945846):(63.334087)
X(121.555709):(57.412530)
X(122.108022):(51.943186)
X(122.607272):(46.909034)
X(123.057759):(42.290559)
X(123.463576):(38.066391)
X(123.828595):(34.213890)
X(124.156455):(30.709675)
X(124.450555):(27.530091)
X(124.714056):(24.651602)
X(124.949886):(22.051124)
X(125.160740):(19.706291)
X(125.349093):(17.595654)
X(125.517208):(15.698839)
X(125.667148):(13.996639)
X(125.800788):(12.471081)
X(125.919829):(11.105446)
X(126.025807):(9.884271)
X(126.120110):(8.793320)
X(126.203988):(7.819546)
X(126.278564):(6.951033)
X(126.344845):(6.176941)
X(126.403737):(5.487431)
X(126.456048):(4.873602)
X(126.502502):(4.327417)
X(126.543746):(3.841637)
X(126.580356):(3.409752)
X(126.612848):(3.025916)
X(126.641681):(2.684892)
X(126.667262):(2.381987)
X(126.689955):(2.113009)
X(126.710086):(1.874209)
X(126.727940):(1.662243)
X(126.743774):(1.474129)
X(126.757816):(1.307208)
X(126.770268):(1.159113)
X(126.781308):(1.027737)
X(126.791097):(0.911205)
X(126.799776):(0.807849)
X(126.807471):(0.716189)
X(126.814292):(0.634905)
X(126.820339):(0.562829)
X(126.825699):(0.498922)
X(126.830451):(0.442260)
X(126.834663):(0.392024)
X(126.838396):(0.347488)
X(126.841705):(0.308006)
X(126.844639):(0.273005)
X(126.847239):(0.241979)
X(126.849543):(0.214476)
X(126.851586):(0.190097)
X(126.853396):(0.168488)
X(126.855000):(0.149334)
X(126.856423):(0.132356)
X(126.857683):(0.117308)
DWELL15000 ; dwell time in ms
LINEAR
TA100
TS0
TM1000
; Comment below to prevent paddles moving back to zero after dwelling
X0
CLOSE
CLOSE