Plugin SeismicLab AspasiaZerva

From LabRPS Documentation
Revision as of 16:12, 24 January 2025 by LabRPS (talk | contribs) (Created page with "{{Plugin |Name=Aspasia Zerva Plugin |Description=This plugin simulates seismic ground motion according to the approach proposed by Aspasia Zerva (1992). |Author=Koffi Daniel |Version=1.0 |Date=21/12/2024 |Features= Aspasia Zerva 1992 |RPSVersion=All }} == Aspasia Zerva 1992 == This plugin simulates seismic ground motion according to the approach proposed by Aspasia Zerva (1992). 1024px...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Generic plugin icon. Create your personal icon with the same name of the plugin Aspasia Zerva Plugin

Description
This plugin simulates seismic ground motion according to the approach proposed by Aspasia Zerva (1992).

Plugin version: 1.0
Last modified: 21/12/2024
LabRPS version: All
Author: Koffi Daniel
Author
Koffi Daniel
Download
None
Features
Aspasia Zerva 1992
Plugin Version
1.0
Date last modified
21/12/2024
LabRPS Version(s)
All
Default shortcut
None
See also
None

Aspasia Zerva 1992

This plugin simulates seismic ground motion according to the approach proposed by Aspasia Zerva (1992).

Plugin SeismicLab AspasiaZerva Screenshot 1.png

Wittig Sinha Equal Floors

This is the only RPS feature that the plugin implements. It belongs to the simulation method group. This feature implements the seismic ground motion simulation method according to Aspasia Zerva (1992)

Feature Dependency

The features required by this feature are summarized in the following table:

Properties

  • DataStandardDeviation: The standard deviation of the excitation.
  • DataDominantFrequency: The dominant frequency of the earthquake excitation.
  • DataDampingRatio: The bandwidth of the earthquake excitation.
  • DataEnvelopValueAtNinetyPercentDuration: The value of the envelop function at 90 percent of the duration.
  • DataNormalizedDurationTimeAtPeak: The normalized duration time when ground motion achieves peak.


Scripting

import LabRPS
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import time 

def simulate():
    # Plugin
    installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
    if not installResuslt:
       LabRPS.Console.PrintError("The installation the SeismicLabPlugin has failed.\n")
       return None

    installResuslt = SeismicLab.installPlugin("AspasiaZervaPlugin")
    if not installResuslt:
       LabRPS.Console.PrintError("The installation the AspasiaZervaPlugin has failed.\n")
       return None
    
    # Document
    doc = LabRPS.newDocument()

    # Simulation
    sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
    if not sim:
       LabRPS.Console.PrintError("The simulation does not exist.\n")
       return None

    # Simulation points
    loc = SeismicLabObjects.makeFeature("SimulationPoints", "Simulation",  "Horizontal Distribution", "Location Distribution")
    if not loc:
        LabRPS.Console.PrintError("Error on creating the location distribution.\n")
        return None

    # Frequencies
    frequency = SeismicLabObjects.makeFeature("Frequencies", "Simulation",  "Double Index Frequency Discretization", "Frequency Distribution")   
    if not frequency:
        LabRPS.Console.PrintError("Error on creating the frequency distribution.\n")
        return None

    # Spectrum
    spectrum = SeismicLabObjects.makeFeature("Spectrum", "Simulation",  "Clough-Penzien Spectrum", "Spectrum")
    if not spectrum:
        LabRPS.Console.PrintError("Error on creating the spectrum model.\n")
        return None

    # Spectrum decomposition
    spectrumD = SeismicLabObjects.makeFeature("Envelop", "Simulation",  "Bogdanoff Goldberg Bernard Modulation Function", "Modulation Function")
    if not spectrumD:
        LabRPS.Console.PrintError("Error on creating the modulation function.\n")
        return None
    
    # Random phase
    randomness = SeismicLabObjects.makeFeature("RandomPhases", "Simulation",  "Uniform Random Phases", "Randomness Provider")
    if not randomness:
        LabRPS.Console.PrintError("The creation of the randomness provider was not successuful.\n")
        return None

    # Simulation method
    simMethod = SeismicLabObjects.makeFeature("SimulationMethod", "Simulation",  "Aspasia Zerva 1992", "Simulation Method")
    if not simMethod:
        LabRPS.Console.PrintError("Error on creating the simulation method.\n")
        return None
    sim.Stationarity = False
    # Run simulation and output the first(0) sample
    # store starting time 
    begin = time.time() 
    velocities = sim.simulate(0)
    # store end time 
    end = time.time()
    LabRPS.Console.PrintMessage(f"Total runtime of the simulaltion is {end - begin} seconds\n")

    if LabRPS.GuiUp:
       import SeismicLabGui
       import GeneralToolsGui
       SeismicLabGui.setActiveSimulation(sim)
       GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfTimeIncrements, sim.getSimulationData().numberOfSpatialPosition + 1, velocities, True)
    doc.recompute()
simulate()