Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
General Math
Calculus
Differential Equations
Topology and Analysis
Linear and Abstract Algebra
Differential Geometry
Set Theory, Logic, Probability, Statistics
MATLAB, Maple, Mathematica, LaTeX
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Mathematics
MATLAB, Maple, Mathematica, LaTeX
MATLAB API For Wave Flume Data Analysis
Reply to thread
Message
[QUOTE="person123, post: 6205864, member: 611120"] [B]TL;DR Summary:[/B] I'm working on developing an API for data analysis and I want to know what similar opensource code already exists and what would be the most useful route to develop it. (As a quick note, 'wave flume' should be taken rather generally. I basically just mean the sort of experiments involved in the flow of water which may use instruments such as pressure gauges, load cells, wave gauges, and ADVs. I know that they're not always done in a flume per say -- the experiment I'm analyzing data from was technically conducted in a basin and not a flume -- but I'm not sure of the proper term). I'm an REU student assigned to analyze data from an experiment conducted at the HWRL. [URL='https://www.gazettetimes.com/news/local/osu-wave-experiment-targets-beach-houses/article_6eb13da7-5277-5749-8933-49975eb6289d.html']Here[/URL] is a link to a news article about it. I'm working on an API in MATLAB to help with analyzing data from sensors such as those in those sort of experiments. The individual functions were all created for me for this specific project, but an API would allow you to use what I wrote however you like. I have an extremely crude version already written, but it would be pretty much useless for others (it's extremely slow, it crashes, it's not at all user-friendly). (Some problems include: there's no documentation, there's only a single class, making my own GUI instead of using documentation causes it to crash due to a graphics error). It was, however, a proof of concept, and I'm now going to start to gradually build an API which will hopefully be useful. I already have some features which could be used for general purposes (not limited to 'wave flume' type experiments): [LIST=1] [*]I have not written code to allow you to customize the type of data you want to extract from the raw data because it has not been useful for me yet, but I think this would be essential to implement if I were to make an API. An example of extracted data is the wave height recorded for each trial for each sensor. (I'm not going to go over how I extracted all of the data on this main post because it isn't that relevant, but I would be more than happy to explain all the steps I took if someone wanted me to). [*]Built in constants. For me, all I needed so far was water density and the acceleration due to gravity. [*]Allows you to create your own constants. In my case, for example, one house was on stilts and the stilt height would be a good constant. [*]Allows you to create your own parameters based on those constants. Using the previous example, I then made the parameter air gap which used the constant stilt height (the air gap is the stilt height minus water depth). [*]Allows you to plot those created parameters against one another. (There are three parameters: independent, dependent, and legend -- the legend is automatically constructed based on unique values). For example, I could then plot uplift vs. the air gap parameter I constructed at different water depths say (just a random example). The title and labels are automatically generated based on your selection. [*]Allows you to automatically save figures and update a PowerPoint with those figures (I haven't used Word yet, so I haven't implemented that yet, but I probably will once I start writing my research paper). [/LIST] But then there's also stuff which is more 'wave flume' specific (these were all things which I created for my specific project): [LIST=1] [*]Computes uplift and moment from pressure gauge readings using different methods. There were multiple pressure gauges on the bottom of the house, and I think having multiple pressure gauges all in the same plane is fairly general. Originally I computed using uplift and moment using a bilinear multivariable regression. (I actually deleted that code because my mentor said he didn't want to do it like that, but I could rewrite it very easily. I could even simply build the structure of it using mvregress and the user could choose the kind of fit they want). However I also used tributary areas and a linear regression to compute uplift and moment -- both assume pressure doesn't vary along the long-shore direction of the house. [*]Computes phase average with period and sample rate of sensor as an input. (I'm not sure if my code for Fourier Transform is correct -- I haven't really looked at it because I haven't been asked to use it yet). [*]Computing wave height using wave gauges. It first finds the phase average, then finds the difference between the maximum and minimum value of the phase average. [*]Computes wavelength using linear wave theory (it takes water depth and wave period as inputs and uses vpasolve (built-in function to solve equation numerically) to determine the wavelength. [*][LEFT][SIZE=16px][FONT=Noto Sans][COLOR=rgb(29, 29, 29)]It computes uplift and moment from load cells (fairly self-explanatory I think).[/COLOR][/FONT][/SIZE][/LEFT] [*]A method for computing wave energy to use for normalization (in my case, I used ##E=\rho g H y## (##H## is wave height and ##y## is the length of the house in the long-shore direction) [*]There are other things I implemented which my mentor said weren't useful to our project, but may be useful in general: [LIST=1] [*]Computes wave height using Green's Law. The wave height at the wave maker is stored in the metadata so I could use Green's Law to account for shoaling during wave propagation. (The flume bottom was at a tilt so the depth decreased as the wave propagated). The waves were already broken, or close to breaking by the time it came in contact with the house, so for us it wouldn't be accurate. [*]Computes wave length by finding the shift in wave gauge readings between successive sensors and takes the cross-shore distance between the gauges as inputs. Noisy reading, a fairly poor method for calculating it (it counted every time the reading crosses zero as half a period, making it useless for noisy reading), and the fact we can use linear wave theory made it useless for us. However, I could create a more robust algorithm (I'm thinking of minimizing the difference between the two readings by shifting one reading through time to match the other) if it turns out to be useful (maybe you don't want to approximate with linear wave theory). [/LIST] [/LIST] That's all I have right now because that's all I was asked to do for this project so far, but I would love to started building more to it through a system of subclasses which inherit from one another. First though I want to know what exists which is similar to this and where I could find my niche. To clarify, if I were to develop this, I would imagine making it an opensource code in which anyone can view my code, make edits, and build on to it. I think I may use [URL='https://www.mathworks.com/matlabcentral/fileexchange/']File Exchange[/URL] to share my code. Thanks! I'm a bit hesitant of adding this as a footnote; as I don't know if it's possible, I don't know how to do it, and I'm sure I wouldn't be able to do it; but I could imagine it may be theoretically possible to connect the API with some CFD software. It would have to use [URL='https://www.mathworks.com/help/matlab/call-matlab-com-automation-server.html']this[/URL] to figure out what's going on in your server and somehow talk to the software. The software would need to know how to set everything up. It would need a lot of information: dimensions of everything, all boundary conditions, all the information about the wave conditions etc. That information would be fed to the software as directions and the software would follow those directions to run a simulation. (Something like this, but probably a lot simpler, might also work with CAD software). Again though, I have no idea if this is possible. [/QUOTE]
Insert quotes…
Post reply
Forums
Mathematics
MATLAB, Maple, Mathematica, LaTeX
MATLAB API For Wave Flume Data Analysis
Back
Top