<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.labrps.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_SeaLab_QBlade</id>
	<title>Plugin SeaLab QBlade - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.labrps.com/index.php?action=history&amp;feed=atom&amp;title=Plugin_SeaLab_QBlade"/>
	<link rel="alternate" type="text/html" href="https://wiki.labrps.com/index.php?title=Plugin_SeaLab_QBlade&amp;action=history"/>
	<updated>2026-04-07T10:46:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://wiki.labrps.com/index.php?title=Plugin_SeaLab_QBlade&amp;diff=2602&amp;oldid=prev</id>
		<title>LabRPS: Created page with &quot;{{Plugin |Name=QBlade Plugin |Description=This plugin adds the sea surface simulation functionalities of QBlade to LabRPS. |Author=Koffi Daniel |Version=1.0 |Date=21/12/2024 |Features= QBlade Methods (CE_2.0.4_a)   |RPSVersion=All }}  == Introduction == This plugin adds the sea surface simulation functionalities of QBlade to LabRPS.  1024px   == QBlade Methods ==  This is the only RPS feature that...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.labrps.com/index.php?title=Plugin_SeaLab_QBlade&amp;diff=2602&amp;oldid=prev"/>
		<updated>2025-01-25T21:58:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Plugin |Name=QBlade Plugin |Description=This plugin adds the sea surface simulation functionalities of QBlade to LabRPS. |Author=Koffi Daniel |Version=1.0 |Date=21/12/2024 |Features= &lt;a href=&quot;#QBlade_Methods&quot;&gt;QBlade Methods (CE_2.0.4_a)&lt;/a&gt;   |RPSVersion=All }}  == Introduction == This plugin adds the sea surface simulation functionalities of QBlade to LabRPS.  &lt;a href=&quot;/File:Plugin_SeaLab_QBladeMethods_Screenshot_1.png&quot; title=&quot;File:Plugin SeaLab QBladeMethods Screenshot 1.png&quot;&gt;1024px&lt;/a&gt;   == QBlade Methods ==  This is the only RPS feature that...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Plugin&lt;br /&gt;
|Name=QBlade Plugin&lt;br /&gt;
|Description=This plugin adds the sea surface simulation functionalities of QBlade to LabRPS.&lt;br /&gt;
|Author=Koffi Daniel&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=21/12/2024&lt;br /&gt;
|Features= [[#QBlade_Methods|QBlade Methods (CE_2.0.4_a)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|RPSVersion=All&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This plugin adds the sea surface simulation functionalities of QBlade to LabRPS.&lt;br /&gt;
&lt;br /&gt;
[[Image:Plugin_SeaLab_QBladeMethods_Screenshot_1.png|1024px]] &lt;br /&gt;
&lt;br /&gt;
== QBlade Methods == &lt;br /&gt;
This is the only RPS feature that the plugin implements. It belongs to the [[RPS_Feature_Group#Simulation_Method| simulation method group]]. This feature allows the user to simulate sea surface as regular or irregular wave based on QBlade which is an advanced multi-physics software designed to facilitate the comprehensive aero-servo-hydro-elastic development, prototyping, simulation, and certification of wind turbines.&lt;br /&gt;
&lt;br /&gt;
=== Feature Dependency === &lt;br /&gt;
The features required by this feature are as follows:&lt;br /&gt;
&lt;br /&gt;
* A [[RPS_Feature_Group#Location_Distribution| simulation points feature.]] May be in form of grid.&lt;br /&gt;
* A [[RPS_Feature_Group#Randomness| randomness provider feature]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Properties === &lt;br /&gt;
&lt;br /&gt;
* {{PropertyData|TimeOffset}}:  Time shift of the generated wave signal&lt;br /&gt;
* {{PropertyData|WaveGeneratorType}}: The wave type: 0 = Times Series From File, 1 = Components From File, 2 = Single Wave, 3 = JONSWAP, 4 = ISSC, 5 = TORSETHAUGEN, 6 = OCHI-HUBBLE&lt;br /&gt;
* {{PropertyData|LowCutOff}}: The minimum frequency considered in the DFT, below which wave components are discarded (approximately low-pass filtering).&lt;br /&gt;
* {{PropertyData|HighCutOff}}: The maximum frequency considered in the DFT, above which wave components are discarded (approximately high-pass filtering).&lt;br /&gt;
* {{PropertyData|SignalSamplingRate}}: The frequency with which data from the time series is sampled before the DFT is performed. This allows the user to reduce the number of wave components that will be generated by the DFT.&lt;br /&gt;
* {{PropertyData|AmplitudeThreshold}}: The minimum wave component amplitude allowed after the DFT is performed. This allows the user to filter out wave components with insignificant amplitude and thereby helps to reduce the number of generated wave components.&lt;br /&gt;
* {{PropertyData|SignificantWaveHeight}}: Height of wave train to be generated (directly linked to amplitude)&lt;br /&gt;
* {{PropertyData|SignificantWaveAmplitude}}: Amplitude of the wave (directly linked to wave height)&lt;br /&gt;
* {{PropertyData|PeakPeriod}}: Period of the wave (directly linked to wave frequency)&lt;br /&gt;
* {{PropertyData|PeakFrequency}}: Frequency of the wave (directly linked to the wave period)&lt;br /&gt;
* {{PropertyData|SpectralPeaks}}: The spectrum peak shape: 0 = Single Peak, 1 = Double Peak   &lt;br /&gt;
* {{PropertyData|AutomaticGamma}}: Automatic or manual definition of the spectral width parameter.&lt;br /&gt;
* {{PropertyData|AutomaticSigma}}: Automatic or manual definition of the spectral width parameter.&lt;br /&gt;
* {{PropertyData|Gamma}}: Custom gamma value&lt;br /&gt;
* {{PropertyData|Sigma1}}: sigma1 value&lt;br /&gt;
* {{PropertyData|Sigma2}}: Sigma2 value&lt;br /&gt;
* {{PropertyData|AutomaticOchiHubbleParameters}}: Custom Ochi-Hubble Parameters are used if true&lt;br /&gt;
* {{PropertyData|SignificantWaveHeight1}}: The significant height 1&lt;br /&gt;
* {{PropertyData|SignificantWaveHeight2}}: The significant height 2&lt;br /&gt;
* {{PropertyData|PeakFrequency1}}: Peak frequency 1&lt;br /&gt;
* {{PropertyData|PeakFrequency2}}: Peak frequency 2&lt;br /&gt;
* {{PropertyData|PeakShape1}}: Peak shape 1&lt;br /&gt;
* {{PropertyData|PeakShape2}}: Peak shape 2&lt;br /&gt;
* {{PropertyData|DiscretizationMethod}}: Frequency Discretization: 0 = Equal Energy, 1 = Equal Frequency&lt;br /&gt;
* {{PropertyData|AutomaticFrequencyRange}}: Use automatic frequency range&lt;br /&gt;
* {{PropertyData|CutInFrequency}}: cut-in frequency&lt;br /&gt;
* {{PropertyData|CutOutFrequency}}: cut-out frequency&lt;br /&gt;
* {{PropertyData|MaximumBinWidth}}: Maximum frequency range of the spectrum discretization&lt;br /&gt;
* {{PropertyData|NumberOfFrequencyBins}}: Resolution of frequency discretization of the energy spectrum.&lt;br /&gt;
* {{PropertyData|RandomPhaseSeed,}}: The random seed assigning the wave component phase data&lt;br /&gt;
* {{PropertyData|Directionality}}: Either a unidirectional irregular wave (Single Dir) or multidirectional wave (Cos Spread) can be created&lt;br /&gt;
* {{PropertyData|PrincipalWaveDirection}}: Definition of the wave direction (unidirectional spectrum) or of the principal direction of the cosine spectrum.&lt;br /&gt;
* {{PropertyData|MaximumSpread}}: Definition of the width of the cosine spectrum.&lt;br /&gt;
* {{PropertyData|SpreadingExponent}}: Shape defining parameter for the directional spectrum&lt;br /&gt;
* {{PropertyData|NumberOfDirectionalBins}}: Resolution of angular discretization of the directional spectrum.&lt;br /&gt;
* {{PropertyData|Width}}: Grid width&lt;br /&gt;
* {{PropertyData|Length}}: Grid length&lt;br /&gt;
* {{PropertyData|WidthGridNumber}}: Number of point along the grid width&lt;br /&gt;
* {{PropertyData|LengthGridNumber}}: Number of point along the grid length&lt;br /&gt;
* {{PropertyData|WaterDepth}}: The water depth&lt;br /&gt;
* {{PropertyData|Gravity}}: The gravity&lt;br /&gt;
* {{PropertyData|RequestedVariable}}: Computed Variable (Acceleration, Velocity or Displacement)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scripting === &lt;br /&gt;
&lt;br /&gt;
{{Code|code=&lt;br /&gt;
import LabRPS&lt;br /&gt;
import SeaLab&lt;br /&gt;
import SeaLabObjects&lt;br /&gt;
from LabRPS import Vector as vec&lt;br /&gt;
import time &lt;br /&gt;
&lt;br /&gt;
def simulate():&lt;br /&gt;
    # Plugin&lt;br /&gt;
    installResuslt = SeaLab.installPlugin(&amp;quot;SeaLabPlugin&amp;quot;)&lt;br /&gt;
    if not installResuslt:&lt;br /&gt;
       LabRPS.Console.PrintError(&amp;quot;The installation the QBladePlugin has failed.\n&amp;quot;)&lt;br /&gt;
       return None&lt;br /&gt;
&lt;br /&gt;
    installResuslt = SeaLab.installPlugin(&amp;quot;QBladePlugin&amp;quot;)&lt;br /&gt;
    if not installResuslt:&lt;br /&gt;
       LabRPS.Console.PrintError(&amp;quot;The installation the AspasiaZervaPlugin has failed.\n&amp;quot;)&lt;br /&gt;
       return None&lt;br /&gt;
    &lt;br /&gt;
    # Document&lt;br /&gt;
    doc = LabRPS.newDocument()&lt;br /&gt;
&lt;br /&gt;
    # Simulation&lt;br /&gt;
    sim = SeaLabObjects.makeSimulation(doc, &amp;quot;Simulation&amp;quot;)&lt;br /&gt;
    if not sim:&lt;br /&gt;
       LabRPS.Console.PrintError(&amp;quot;The simulation does not exist.\n&amp;quot;)&lt;br /&gt;
       return None&lt;br /&gt;
&lt;br /&gt;
    # Simulation points&lt;br /&gt;
    loc = SeaLabObjects.makeFeature(&amp;quot;SimulationPoints&amp;quot;, &amp;quot;Simulation&amp;quot;,  &amp;quot;Grid Points&amp;quot;, &amp;quot;Location Distribution&amp;quot;)&lt;br /&gt;
    if not loc:&lt;br /&gt;
        LabRPS.Console.PrintError(&amp;quot;Error on creating the location distribution.\n&amp;quot;)&lt;br /&gt;
        return None&lt;br /&gt;
    &lt;br /&gt;
    # Random phase&lt;br /&gt;
    randomness = SeaLabObjects.makeFeature(&amp;quot;RandomPhases&amp;quot;, &amp;quot;Simulation&amp;quot;,  &amp;quot;Uniform Random Phases&amp;quot;, &amp;quot;Randomness Provider&amp;quot;)&lt;br /&gt;
    if not randomness:&lt;br /&gt;
        LabRPS.Console.PrintError(&amp;quot;The creation of the randomness provider was not successuful.\n&amp;quot;)&lt;br /&gt;
        return None&lt;br /&gt;
&lt;br /&gt;
    # Simulation method&lt;br /&gt;
    simMethod = SeaLabObjects.makeFeature(&amp;quot;SimulationMethod&amp;quot;, &amp;quot;Simulation&amp;quot;,  &amp;quot;QBlade Methods (CE_2.0.4_a)&amp;quot;, &amp;quot;Simulation Method&amp;quot;)&lt;br /&gt;
    if not simMethod:&lt;br /&gt;
        LabRPS.Console.PrintError(&amp;quot;Error on creating the simulation method.\n&amp;quot;)&lt;br /&gt;
        return None&lt;br /&gt;
    sim.Stationarity = False&lt;br /&gt;
    # Run simulation and output the first(0) sample&lt;br /&gt;
    # store starting time &lt;br /&gt;
    begin = time.time() &lt;br /&gt;
    velocities = sim.simulate(0)&lt;br /&gt;
    # store end time &lt;br /&gt;
    end = time.time()&lt;br /&gt;
    LabRPS.Console.PrintMessage(f&amp;quot;Total runtime of the simulaltion is {end - begin} seconds\n&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    if LabRPS.GuiUp:&lt;br /&gt;
       import SeaLabGui&lt;br /&gt;
       import GeneralToolsGui&lt;br /&gt;
       SeaLabGui.setActiveSimulation(sim)&lt;br /&gt;
       GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfTimeIncrements, sim.getSimulationData().numberOfSpatialPosition + 1, velocities, True)&lt;br /&gt;
    doc.recompute()&lt;br /&gt;
simulate()&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>LabRPS</name></author>
	</entry>
</feed>