diff --git a/setup.py b/setup.py index dc4e1d3e..ad763f6b 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup( name="simapy", - version="4.6.1.dev2", + version="4.8.0.dev0", author="SINTEF Ocean", description="Python utilities for SIMA", url="https://github.com/SINTEF/simapy", diff --git a/src/simapy/sima/command/blueprints/exportblueprintcommand.py b/src/simapy/sima/command/blueprints/exportblueprintcommand.py index ebb8851c..2acf102e 100644 --- a/src/simapy/sima/command/blueprints/exportblueprintcommand.py +++ b/src/simapy/sima/command/blueprints/exportblueprintcommand.py @@ -17,4 +17,4 @@ def __init__(self, name="ExportBlueprintCommand", package_path="sima/command", d self.add_attribute(Attribute("name","string","")) self.add_attribute(BlueprintAttribute("parameters","sima/sima/Property","Additional parameters",True,Dimension("*"))) self.add_attribute(Attribute("output","string","Optional output directory. If not specified the blueprints will be imported into the current workspace")) - self.add_attribute(Attribute("versions","boolean","Write package version files",default=False)) \ No newline at end of file + self.add_attribute(Attribute("delete","boolean","Delete the content of the output folder before exporting",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/command/exportblueprintcommand.py b/src/simapy/sima/command/exportblueprintcommand.py index ace7fed3..b37a7f93 100644 --- a/src/simapy/sima/command/exportblueprintcommand.py +++ b/src/simapy/sima/command/exportblueprintcommand.py @@ -22,18 +22,18 @@ class ExportBlueprintCommand(Command): Additional parameters output : str Optional output directory. If not specified the blueprints will be imported into the current workspace(default None) - versions : bool - Write package version files(default False) + delete : bool + Delete the content of the output folder before exporting(default False) """ - def __init__(self , description="", versions=False, **kwargs): + def __init__(self , description="", delete=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.name = None self.parameters = list() self.output = None - self.versions = versions + self.delete = delete for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -100,11 +100,11 @@ def output(self, value: str): self.__output = value @property - def versions(self) -> bool: - """Write package version files""" - return self.__versions - - @versions.setter - def versions(self, value: bool): - """Set versions""" - self.__versions = bool(value) + def delete(self) -> bool: + """Delete the content of the output folder before exporting""" + return self.__delete + + @delete.setter + def delete(self, value: bool): + """Set delete""" + self.__delete = bool(value) diff --git a/src/simapy/sima/environment/__init__.py b/src/simapy/sima/environment/__init__.py index 3536fcbc..e2913beb 100644 --- a/src/simapy/sima/environment/__init__.py +++ b/src/simapy/sima/environment/__init__.py @@ -14,11 +14,11 @@ from .fluctuatingtwocomponent import FluctuatingTwoComponent # noqa from .fluctuatingwindvelocityprofile import FluctuatingWindVelocityProfile # noqa from .harris import Harris # noqa +from .iso199011wind import ISO199011Wind # noqa from .jonswap import Jonswap # noqa from .jonswap3p import Jonswap3P # noqa from .jonswap6p import Jonswap6P # noqa from .jonswapdoublepeaked import JonswapDoublePeaked # noqa -from .npdwind import NPDWind # noqa from .numericalwave import NumericalWave # noqa from .ochi import Ochi # noqa from .piersonmoskowitz import PiersonMoskowitz # noqa diff --git a/src/simapy/sima/environment/blueprints/esduwind.py b/src/simapy/sima/environment/blueprints/esduwind.py index ed0afd89..a1dfc90f 100644 --- a/src/simapy/sima/environment/blueprints/esduwind.py +++ b/src/simapy/sima/environment/blueprints/esduwind.py @@ -16,5 +16,6 @@ def __init__(self, name="ESDUWind", package_path="sima/environment", description self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("direction","number","Wind propagation direction",default=0.0)) self.add_attribute(Attribute("averageVelocity","number","Average velocity at reference height",default=0.0)) - self.add_attribute(Attribute("psi","number","Site latitude in decimal degrees",default=0.0)) - self.add_attribute(Attribute("friction","number","Surface drag coefficient used for transverse gust spectrum",default=0.002)) \ No newline at end of file + self.add_attribute(Attribute("profileExponent","number","Wind profile exponent",default=0.11)) + self.add_attribute(Attribute("friction","number","Surface drag coefficient.\nAlso used for transverse gust spectrum, if specified.",default=0.002)) + self.add_attribute(Attribute("psi","number","Site latitude in decimal degrees",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/environment/blueprints/npdwind.py b/src/simapy/sima/environment/blueprints/iso199011wind.py similarity index 86% rename from src/simapy/sima/environment/blueprints/npdwind.py rename to src/simapy/sima/environment/blueprints/iso199011wind.py index 33a64896..92dfcd6c 100644 --- a/src/simapy/sima/environment/blueprints/npdwind.py +++ b/src/simapy/sima/environment/blueprints/iso199011wind.py @@ -1,5 +1,5 @@ # -# Generated with NPDWindBlueprint +# Generated with ISO199011WindBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute @@ -7,10 +7,10 @@ from dmt.blueprint_attribute import BlueprintAttribute from .wind import WindBlueprint -class NPDWindBlueprint(WindBlueprint): +class ISO199011WindBlueprint(WindBlueprint): """""" - def __init__(self, name="NPDWind", package_path="sima/environment", description=""): + def __init__(self, name="ISO199011Wind", package_path="sima/environment", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) diff --git a/src/simapy/sima/environment/blueprints/numericalwave.py b/src/simapy/sima/environment/blueprints/numericalwave.py index 54117247..3cd56d63 100644 --- a/src/simapy/sima/environment/blueprints/numericalwave.py +++ b/src/simapy/sima/environment/blueprints/numericalwave.py @@ -14,6 +14,8 @@ def __init__(self, name="NumericalWave", package_path="sima/environment", descri super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("fromFile","boolean","Define numerical spectrum in external file",default=False)) self.add_attribute(Attribute("directions","number","Number of wave directions",Dimension("*"),default=0.0)) self.add_attribute(Attribute("frequencies","number","Number of wave frequencies",Dimension("*"),default=0.0)) - self.add_attribute(Attribute("values","number","",Dimension("*"),default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("values","number","",Dimension("*"),default=0.0)) + self.add_attribute(Attribute("file","string","Name of external file with specified numerical spectrum data")) \ No newline at end of file diff --git a/src/simapy/sima/environment/esduwind.py b/src/simapy/sima/environment/esduwind.py index 5a3f9a98..ba7b2e0f 100644 --- a/src/simapy/sima/environment/esduwind.py +++ b/src/simapy/sima/environment/esduwind.py @@ -19,20 +19,23 @@ class ESDUWind(Wind): Wind propagation direction(default 0.0) averageVelocity : float Average velocity at reference height(default 0.0) + profileExponent : float + Wind profile exponent(default 0.11) + friction : float + Surface drag coefficient.\nAlso used for transverse gust spectrum, if specified.(default 0.002) psi : float Site latitude in decimal degrees(default 0.0) - friction : float - Surface drag coefficient used for transverse gust spectrum(default 0.002) """ - def __init__(self , description="", direction=0.0, averageVelocity=0.0, psi=0.0, friction=0.002, **kwargs): + def __init__(self , description="", direction=0.0, averageVelocity=0.0, profileExponent=0.11, friction=0.002, psi=0.0, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.direction = direction self.averageVelocity = averageVelocity - self.psi = psi + self.profileExponent = profileExponent self.friction = friction + self.psi = psi for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -87,21 +90,32 @@ def averageVelocity(self, value: float): self.__averageVelocity = float(value) @property - def psi(self) -> float: - """Site latitude in decimal degrees""" - return self.__psi + def profileExponent(self) -> float: + """Wind profile exponent""" + return self.__profileExponent - @psi.setter - def psi(self, value: float): - """Set psi""" - self.__psi = float(value) + @profileExponent.setter + def profileExponent(self, value: float): + """Set profileExponent""" + self.__profileExponent = float(value) @property def friction(self) -> float: - """Surface drag coefficient used for transverse gust spectrum""" + """Surface drag coefficient. +Also used for transverse gust spectrum, if specified.""" return self.__friction @friction.setter def friction(self, value: float): """Set friction""" self.__friction = float(value) + + @property + def psi(self) -> float: + """Site latitude in decimal degrees""" + return self.__psi + + @psi.setter + def psi(self, value: float): + """Set psi""" + self.__psi = float(value) diff --git a/src/simapy/sima/environment/npdwind.py b/src/simapy/sima/environment/iso199011wind.py similarity index 95% rename from src/simapy/sima/environment/npdwind.py rename to src/simapy/sima/environment/iso199011wind.py index e8d365af..a647bcdb 100644 --- a/src/simapy/sima/environment/npdwind.py +++ b/src/simapy/sima/environment/iso199011wind.py @@ -1,14 +1,14 @@ # This an autogenerated file # -# Generated with NPDWind +# Generated with ISO199011Wind from typing import Dict,Sequence,List from dmt.blueprint import Blueprint -from .blueprints.npdwind import NPDWindBlueprint +from .blueprints.iso199011wind import ISO199011WindBlueprint from typing import Dict from ..sima import ScriptableValue from .wind import Wind -class NPDWind(Wind): +class ISO199011Wind(Wind): """ Keyword arguments ----------------- @@ -44,7 +44,7 @@ def __init__(self , description="", direction=0.0, averageVelocity=0.0, profileE @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" - return NPDWindBlueprint() + return ISO199011WindBlueprint() @property diff --git a/src/simapy/sima/environment/numericalwave.py b/src/simapy/sima/environment/numericalwave.py index b122fd30..0cc2c37e 100644 --- a/src/simapy/sima/environment/numericalwave.py +++ b/src/simapy/sima/environment/numericalwave.py @@ -15,20 +15,26 @@ class NumericalWave(Wave): description : str (default "") scriptableValues : List[ScriptableValue] + fromFile : bool + Define numerical spectrum in external file(default False) directions : ndarray of float Number of wave directions frequencies : ndarray of float Number of wave frequencies values : ndarray of float + file : str + Name of external file with specified numerical spectrum data(default None) """ - def __init__(self , description="", **kwargs): + def __init__(self , description="", fromFile=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() + self.fromFile = fromFile self.directions = [] self.frequencies = [] self.values = [] + self.file = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -62,6 +68,16 @@ def scriptableValues(self, value: List[ScriptableValue]): raise ValueError("Expected sequense, but was " , type(value)) self.__scriptableValues = value + @property + def fromFile(self) -> bool: + """Define numerical spectrum in external file""" + return self.__fromFile + + @fromFile.setter + def fromFile(self, value: bool): + """Set fromFile""" + self.__fromFile = bool(value) + @property def directions(self) -> ndarray: """Number of wave directions""" @@ -100,3 +116,13 @@ def values(self, value: ndarray): if len(array) > 0 and array.ndim != 1: raise ValueError("Expected array with 1 dimensions") self.__values = array + + @property + def file(self) -> str: + """Name of external file with specified numerical spectrum data""" + return self.__file + + @file.setter + def file(self, value: str): + """Set file""" + self.__file = value diff --git a/src/simapy/sima/graph/__init__.py b/src/simapy/sima/graph/__init__.py index 01bfb470..ac6aea0c 100644 --- a/src/simapy/sima/graph/__init__.py +++ b/src/simapy/sima/graph/__init__.py @@ -1,2 +1,4 @@ +from .nodeinputslot import NodeInputSlot # noqa +from .nodeoutputslot import NodeOutputSlot # noqa from .point import Point # noqa \ No newline at end of file diff --git a/src/simapy/sima/report/blueprints/formula.py b/src/simapy/sima/graph/blueprints/nodeinputslot.py similarity index 58% rename from src/simapy/sima/report/blueprints/formula.py rename to src/simapy/sima/graph/blueprints/nodeinputslot.py index fc909ced..6cd597c2 100644 --- a/src/simapy/sima/report/blueprints/formula.py +++ b/src/simapy/sima/graph/blueprints/nodeinputslot.py @@ -1,18 +1,17 @@ # -# Generated with FormulaBlueprint +# Generated with NodeInputSlotBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from .reportitem import ReportItemBlueprint +from ...sima.blueprints.named import NamedBlueprint -class FormulaBlueprint(ReportItemBlueprint): +class NodeInputSlotBlueprint(NamedBlueprint): """""" - def __init__(self, name="Formula", package_path="sima/report", description=""): + def __init__(self, name="NodeInputSlot", package_path="sima/graph", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("latex","string","")) - self.add_attribute(Attribute("caption","string","Caption")) \ No newline at end of file + self.add_attribute(Attribute("name","string","")) \ No newline at end of file diff --git a/src/simapy/sima/graph/blueprints/nodeoutputslot.py b/src/simapy/sima/graph/blueprints/nodeoutputslot.py new file mode 100644 index 00000000..7d39952d --- /dev/null +++ b/src/simapy/sima/graph/blueprints/nodeoutputslot.py @@ -0,0 +1,17 @@ +# +# Generated with NodeOutputSlotBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.named import NamedBlueprint + +class NodeOutputSlotBlueprint(NamedBlueprint): + """""" + + def __init__(self, name="NodeOutputSlot", package_path="sima/graph", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) \ No newline at end of file diff --git a/src/simapy/sima/report/linkable.py b/src/simapy/sima/graph/nodeinputslot.py similarity index 77% rename from src/simapy/sima/report/linkable.py rename to src/simapy/sima/graph/nodeinputslot.py index f78c9d88..d7d9b828 100644 --- a/src/simapy/sima/report/linkable.py +++ b/src/simapy/sima/graph/nodeinputslot.py @@ -1,21 +1,21 @@ # This an autogenerated file # -# Generated with Linkable +# Generated with NodeInputSlot from typing import Dict,Sequence,List from dmt.blueprint import Blueprint -from .blueprints.linkable import LinkableBlueprint +from .blueprints.nodeinputslot import NodeInputSlotBlueprint from typing import Dict -from ..sima import MOAO +from ..sima import Named from ..sima import ScriptableValue -class Linkable(MOAO): +class NodeInputSlot(Named): """ Keyword arguments ----------------- description : str (default "") scriptableValues : List[ScriptableValue] - identifier : str + name : str (default None) """ @@ -23,7 +23,7 @@ def __init__(self , description="", **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() - self.identifier = None + self.name = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -32,7 +32,7 @@ def __init__(self , description="", **kwargs): @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" - return LinkableBlueprint() + return NodeInputSlotBlueprint() @property @@ -58,11 +58,11 @@ def scriptableValues(self, value: List[ScriptableValue]): self.__scriptableValues = value @property - def identifier(self) -> str: + def name(self) -> str: """""" - return self.__identifier + return self.__name - @identifier.setter - def identifier(self, value: str): - """Set identifier""" - self.__identifier = value + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value diff --git a/src/simapy/sima/report/formula.py b/src/simapy/sima/graph/nodeoutputslot.py similarity index 68% rename from src/simapy/sima/report/formula.py rename to src/simapy/sima/graph/nodeoutputslot.py index 5bc967e1..b67a674d 100644 --- a/src/simapy/sima/report/formula.py +++ b/src/simapy/sima/graph/nodeoutputslot.py @@ -1,32 +1,29 @@ # This an autogenerated file # -# Generated with Formula +# Generated with NodeOutputSlot from typing import Dict,Sequence,List from dmt.blueprint import Blueprint -from .blueprints.formula import FormulaBlueprint +from .blueprints.nodeoutputslot import NodeOutputSlotBlueprint from typing import Dict +from ..sima import Named from ..sima import ScriptableValue -from .reportitem import ReportItem -class Formula(ReportItem): +class NodeOutputSlot(Named): """ Keyword arguments ----------------- description : str (default "") scriptableValues : List[ScriptableValue] - latex : str + name : str (default None) - caption : str - Caption(default None) """ def __init__(self , description="", **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() - self.latex = None - self.caption = None + self.name = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -35,7 +32,7 @@ def __init__(self , description="", **kwargs): @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" - return FormulaBlueprint() + return NodeOutputSlotBlueprint() @property @@ -61,21 +58,11 @@ def scriptableValues(self, value: List[ScriptableValue]): self.__scriptableValues = value @property - def latex(self) -> str: + def name(self) -> str: """""" - return self.__latex + return self.__name - @latex.setter - def latex(self, value: str): - """Set latex""" - self.__latex = value - - @property - def caption(self) -> str: - """Caption""" - return self.__caption - - @caption.setter - def caption(self, value: str): - """Set caption""" - self.__caption = value + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value diff --git a/src/simapy/sima/metocean/blueprints/longtermstatisticscalculation.py b/src/simapy/sima/metocean/blueprints/longtermstatisticscalculation.py index 48d4d1ac..6c6a4e89 100644 --- a/src/simapy/sima/metocean/blueprints/longtermstatisticscalculation.py +++ b/src/simapy/sima/metocean/blueprints/longtermstatisticscalculation.py @@ -18,7 +18,7 @@ def __init__(self, name="LongTermStatisticsCalculation", package_path="sima/meto self.add_attribute(Attribute("name","string","")) self.add_attribute(Attribute("relativeCompassAngle","number","Relative angle between analysis x-axis and north direction in anti-clockwise direction.\nShould match the angle given in the recieving SIMA task location.",default=0.0)) self.add_attribute(EnumAttribute("inputReferenceSystem","sima/metocean/InputReferenceSystem","Defines the input reference system of the data.\nIf the data is defined in the Metocean system the corresponding SIMA coordinate system data is generated")) - self.add_attribute(Attribute("applyNorsok","boolean"," Apply NORSOK N-006",default=True)) + self.add_attribute(Attribute("applyNorsok","boolean"," Apply NORSOK N-006 ( A directional factor of 6 (corresponding to 12 directions) is applied to the return period)",default=True)) self.add_attribute(BlueprintAttribute("longTermStatistics","sima/metocean/LongTermStatistics","",False)) self.add_attribute(BlueprintAttribute("period","sima/metocean/LongTermStatisticsPeriod","",False)) self.add_attribute(BlueprintAttribute("waveCalculation","sima/metocean/LongTermStatisticsWaveCalculation","",True)) diff --git a/src/simapy/sima/metocean/longtermstatisticscalculation.py b/src/simapy/sima/metocean/longtermstatisticscalculation.py index b45db187..8603c241 100644 --- a/src/simapy/sima/metocean/longtermstatisticscalculation.py +++ b/src/simapy/sima/metocean/longtermstatisticscalculation.py @@ -32,7 +32,7 @@ class LongTermStatisticsCalculation(NamedObject,ConditionSelectable): inputReferenceSystem : InputReferenceSystem Defines the input reference system of the data.\nIf the data is defined in the Metocean system the corresponding SIMA coordinate system data is generated applyNorsok : bool - Apply NORSOK N-006(default True) + Apply NORSOK N-006 ( A directional factor of 6 (corresponding to 12 directions) is applied to the return period)(default True) longTermStatistics : LongTermStatistics period : LongTermStatisticsPeriod waveCalculation : LongTermStatisticsWaveCalculation @@ -120,7 +120,7 @@ def inputReferenceSystem(self, value: InputReferenceSystem): @property def applyNorsok(self) -> bool: - """ Apply NORSOK N-006""" + """ Apply NORSOK N-006 ( A directional factor of 6 (corresponding to 12 directions) is applied to the return period)""" return self.__applyNorsok @applyNorsok.setter diff --git a/src/simapy/sima/package_info.py b/src/simapy/sima/package_info.py index 00fc968b..fb7ed757 100644 --- a/src/simapy/sima/package_info.py +++ b/src/simapy/sima/package_info.py @@ -1 +1,3 @@ -packages = {'command': 1, 'condition': 19,'custom': 12,'doc': 11,'environment': 22,'graph': 4,'hla': 24,'hydro': 28,'metocean': 10,'optimization': 1,'post': 27,'report': 11,'riflex': 43,'signals': 2, 'sima': 24,'simo': 45,'wamit': 14,'windpark': 1,'windturbine': 10,'workflow': 19} + +version = "4.8.0" +packages = {'command': 2, 'condition': 20, 'custom': 13, 'doc': 12, 'environment': 23, 'graph': 5, 'hla': 25, 'hydro': 29, 'metocean': 11, 'optimization': 1, 'post': 28, 'report': 12, 'riflex': 44, 'signals': 2, 'sima': 25, 'simo': 46, 'wamit': 15, 'windpark': 1, 'windturbine': 11, 'workflow': 20} \ No newline at end of file diff --git a/src/simapy/sima/post/__init__.py b/src/simapy/sima/post/__init__.py index facb421d..3b785542 100644 --- a/src/simapy/sima/post/__init__.py +++ b/src/simapy/sima/post/__init__.py @@ -86,6 +86,7 @@ from .runnode import RunNode # noqa from .samplecountoperation import SampleCountOperation # noqa from .scalefilter import ScaleFilter # noqa +from .signalfiltersetup import SignalFilterSetup # noqa from .signalgenerator import SignalGenerator # noqa from .signalgeneratorcontainer import SignalGeneratorContainer # noqa from .signalinputoperation import SignalInputOperation # noqa @@ -135,6 +136,7 @@ from .fatiguelimitindicator import FatigueLimitIndicator # noqa from .fileformat import FileFormat # noqa from .fileinputformat import FileInputFormat # noqa +from .filtering import Filtering # noqa from .gumbelmethod import GumbelMethod # noqa from .internalpressuredesignfactor import InternalPressureDesignFactor # noqa from .iso19901_7_analysis import ISO19901_7_analysis # noqa diff --git a/src/simapy/sima/post/blueprints/distancelinetolinefilter.py b/src/simapy/sima/post/blueprints/distancelinetolinefilter.py index 9dbbdab5..36c29c45 100644 --- a/src/simapy/sima/post/blueprints/distancelinetolinefilter.py +++ b/src/simapy/sima/post/blueprints/distancelinetolinefilter.py @@ -22,4 +22,4 @@ def __init__(self, name="DistanceLineToLineFilter", package_path="sima/post", de self.add_attribute(BlueprintAttribute("controlSignalInputSlots","sima/post/ControlSignalInputSlot","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("filterInputSlots","sima/post/InputSlot","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("filterOutputSlots","sima/post/OutputSlot","",True,Dimension("*"))) - self.add_attribute(Attribute("outputVector","boolean","",default=False)) \ No newline at end of file + self.add_attribute(Attribute("outputVector","boolean","Output the distance vector",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/post/blueprints/fileoutput.py b/src/simapy/sima/post/blueprints/fileoutput.py index 317bf585..83ea2ba8 100644 --- a/src/simapy/sima/post/blueprints/fileoutput.py +++ b/src/simapy/sima/post/blueprints/fileoutput.py @@ -33,4 +33,5 @@ def __init__(self, name="FileOutput", package_path="sima/post", description=""): self.add_attribute(Attribute("skipHeader","boolean","Do not write a header on the file",default=False)) self.add_attribute(Attribute("specifyAdditionalProperties","boolean","Specify additional properties in the file root",default=False)) self.add_attribute(Attribute("writeRawText","boolean","Writes a single input string into the given file",default=False)) - self.add_attribute(Attribute("indent","boolean","Indent the output text",default=False)) \ No newline at end of file + self.add_attribute(Attribute("indent","boolean","Indent the output text",default=False)) + self.add_attribute(Attribute("directModelExport","boolean","Drop the extra signal layer If a model is encountered in the output",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/post/blueprints/inputslot.py b/src/simapy/sima/post/blueprints/inputslot.py index a1782145..02a1c683 100644 --- a/src/simapy/sima/post/blueprints/inputslot.py +++ b/src/simapy/sima/post/blueprints/inputslot.py @@ -5,9 +5,9 @@ from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from ...sima.blueprints.named import NamedBlueprint +from ...graph.blueprints.nodeinputslot import NodeInputSlotBlueprint -class InputSlotBlueprint(NamedBlueprint): +class InputSlotBlueprint(NodeInputSlotBlueprint): """""" def __init__(self, name="InputSlot", package_path="sima/post", description=""): diff --git a/src/simapy/sima/post/blueprints/outputslot.py b/src/simapy/sima/post/blueprints/outputslot.py index 3b0b836f..a8cfc4d1 100644 --- a/src/simapy/sima/post/blueprints/outputslot.py +++ b/src/simapy/sima/post/blueprints/outputslot.py @@ -5,9 +5,9 @@ from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from ...sima.blueprints.named import NamedBlueprint +from ...graph.blueprints.nodeoutputslot import NodeOutputSlotBlueprint -class OutputSlotBlueprint(NamedBlueprint): +class OutputSlotBlueprint(NodeOutputSlotBlueprint): """""" def __init__(self, name="OutputSlot", package_path="sima/post", description=""): diff --git a/src/simapy/sima/post/blueprints/signalfiltersetup.py b/src/simapy/sima/post/blueprints/signalfiltersetup.py new file mode 100644 index 00000000..262d66f5 --- /dev/null +++ b/src/simapy/sima/post/blueprints/signalfiltersetup.py @@ -0,0 +1,22 @@ +# +# Generated with SignalFilterSetupBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.moao import MOAOBlueprint + +class SignalFilterSetupBlueprint(MOAOBlueprint): + """""" + + def __init__(self, name="SignalFilterSetup", package_path="sima/post", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("start","number","",default=0.0)) + self.add_attribute(Attribute("end","number","",default=0.0)) + self.add_attribute(EnumAttribute("filtering","sima/post/Filtering","Filter signal using lower and upper cut off")) + self.add_attribute(Attribute("lowerCutoffFrequency","number","",default=0.0)) + self.add_attribute(Attribute("upperCutoffFrequency","number","",default=0.0)) + self.add_attribute(Attribute("showFullPath","boolean","Show full path when selecting signals",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/post/distancelinetolinefilter.py b/src/simapy/sima/post/distancelinetolinefilter.py index 1f347cb7..804c5d67 100644 --- a/src/simapy/sima/post/distancelinetolinefilter.py +++ b/src/simapy/sima/post/distancelinetolinefilter.py @@ -32,7 +32,7 @@ class DistanceLineToLineFilter(OperationNode): filterInputSlots : List[InputSlot] filterOutputSlots : List[OutputSlot] outputVector : bool - (default False) + Output the distance vector(default False) """ def __init__(self , description="", x=0, y=0, h=0, w=0, outputVector=False, **kwargs): @@ -169,7 +169,7 @@ def filterOutputSlots(self, value: List[OutputSlot]): @property def outputVector(self) -> bool: - """""" + """Output the distance vector""" return self.__outputVector @outputVector.setter diff --git a/src/simapy/sima/post/fileoutput.py b/src/simapy/sima/post/fileoutput.py index 0cdb9486..21e62eef 100644 --- a/src/simapy/sima/post/fileoutput.py +++ b/src/simapy/sima/post/fileoutput.py @@ -55,9 +55,11 @@ class FileOutput(OperationNode,OutputNode,SignalPropertiesContainer): Writes a single input string into the given file(default False) indent : bool Indent the output text(default False) + directModelExport : bool + Drop the extra signal layer If a model is encountered in the output(default False) """ - def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CSV, addMetaTags=False, decimalSeparator=DecimalSeparator.PERIOD, skipHeader=False, specifyAdditionalProperties=False, writeRawText=False, indent=False, **kwargs): + def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CSV, addMetaTags=False, decimalSeparator=DecimalSeparator.PERIOD, skipHeader=False, specifyAdditionalProperties=False, writeRawText=False, indent=False, directModelExport=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -79,6 +81,7 @@ def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CS self.specifyAdditionalProperties = specifyAdditionalProperties self.writeRawText = writeRawText self.indent = indent + self.directModelExport = directModelExport for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -300,3 +303,13 @@ def indent(self) -> bool: def indent(self, value: bool): """Set indent""" self.__indent = bool(value) + + @property + def directModelExport(self) -> bool: + """Drop the extra signal layer If a model is encountered in the output""" + return self.__directModelExport + + @directModelExport.setter + def directModelExport(self, value: bool): + """Set directModelExport""" + self.__directModelExport = bool(value) diff --git a/src/simapy/sima/post/filtering.py b/src/simapy/sima/post/filtering.py new file mode 100644 index 00000000..324b8bee --- /dev/null +++ b/src/simapy/sima/post/filtering.py @@ -0,0 +1,21 @@ +# Generated with Filtering +# +from enum import Enum +from enum import auto + +class Filtering(Enum): + """""" + NONE = auto() + LOWPASS = auto() + HIGHPASS = auto() + BANDPASS = auto() + + def label(self): + if self == Filtering.NONE: + return "None" + if self == Filtering.LOWPASS: + return "Low-pass" + if self == Filtering.HIGHPASS: + return "High-pass" + if self == Filtering.BANDPASS: + return "Band-pass" \ No newline at end of file diff --git a/src/simapy/sima/post/inputslot.py b/src/simapy/sima/post/inputslot.py index 227f4ece..b7610f17 100644 --- a/src/simapy/sima/post/inputslot.py +++ b/src/simapy/sima/post/inputslot.py @@ -5,10 +5,10 @@ from dmt.blueprint import Blueprint from .blueprints.inputslot import InputSlotBlueprint from typing import Dict -from ..sima import Named +from ..graph import NodeInputSlot from ..sima import ScriptableValue -class InputSlot(Named): +class InputSlot(NodeInputSlot): """ Keyword arguments ----------------- diff --git a/src/simapy/sima/post/outputslot.py b/src/simapy/sima/post/outputslot.py index e5379630..b5d11f2e 100644 --- a/src/simapy/sima/post/outputslot.py +++ b/src/simapy/sima/post/outputslot.py @@ -5,10 +5,10 @@ from dmt.blueprint import Blueprint from .blueprints.outputslot import OutputSlotBlueprint from typing import Dict -from ..sima import Named +from ..graph import NodeOutputSlot from ..sima import ScriptableValue -class OutputSlot(Named): +class OutputSlot(NodeOutputSlot): """ Keyword arguments ----------------- diff --git a/src/simapy/sima/post/signalfiltersetup.py b/src/simapy/sima/post/signalfiltersetup.py new file mode 100644 index 00000000..938c74f6 --- /dev/null +++ b/src/simapy/sima/post/signalfiltersetup.py @@ -0,0 +1,134 @@ +# This an autogenerated file +# +# Generated with SignalFilterSetup +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.signalfiltersetup import SignalFilterSetupBlueprint +from typing import Dict +from ..sima import MOAO +from ..sima import ScriptableValue +from .filtering import Filtering + +class SignalFilterSetup(MOAO): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + start : float + (default 0.0) + end : float + (default 0.0) + filtering : Filtering + Filter signal using lower and upper cut off + lowerCutoffFrequency : float + (default 0.0) + upperCutoffFrequency : float + (default 0.0) + showFullPath : bool + Show full path when selecting signals(default False) + """ + + def __init__(self , description="", start=0.0, end=0.0, filtering=Filtering.NONE, lowerCutoffFrequency=0.0, upperCutoffFrequency=0.0, showFullPath=False, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.start = start + self.end = end + self.filtering = filtering + self.lowerCutoffFrequency = lowerCutoffFrequency + self.upperCutoffFrequency = upperCutoffFrequency + self.showFullPath = showFullPath + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return SignalFilterSetupBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def start(self) -> float: + """""" + return self.__start + + @start.setter + def start(self, value: float): + """Set start""" + self.__start = float(value) + + @property + def end(self) -> float: + """""" + return self.__end + + @end.setter + def end(self, value: float): + """Set end""" + self.__end = float(value) + + @property + def filtering(self) -> Filtering: + """Filter signal using lower and upper cut off""" + return self.__filtering + + @filtering.setter + def filtering(self, value: Filtering): + """Set filtering""" + self.__filtering = value + + @property + def lowerCutoffFrequency(self) -> float: + """""" + return self.__lowerCutoffFrequency + + @lowerCutoffFrequency.setter + def lowerCutoffFrequency(self, value: float): + """Set lowerCutoffFrequency""" + self.__lowerCutoffFrequency = float(value) + + @property + def upperCutoffFrequency(self) -> float: + """""" + return self.__upperCutoffFrequency + + @upperCutoffFrequency.setter + def upperCutoffFrequency(self, value: float): + """Set upperCutoffFrequency""" + self.__upperCutoffFrequency = float(value) + + @property + def showFullPath(self) -> bool: + """Show full path when selecting signals""" + return self.__showFullPath + + @showFullPath.setter + def showFullPath(self, value: bool): + """Set showFullPath""" + self.__showFullPath = bool(value) diff --git a/src/simapy/sima/report/__init__.py b/src/simapy/sima/report/__init__.py index dd7e08d5..f2fdcb35 100644 --- a/src/simapy/sima/report/__init__.py +++ b/src/simapy/sima/report/__init__.py @@ -1,8 +1,6 @@ from .appendix import Appendix # noqa -from .formula import Formula # noqa from .image import Image # noqa -from .linkable import Linkable # noqa from .modeldescription import ModelDescription # noqa from .plot import Plot # noqa from .report import Report # noqa diff --git a/src/simapy/sima/report/appendix.py b/src/simapy/sima/report/appendix.py index fb7a140c..7219f912 100644 --- a/src/simapy/sima/report/appendix.py +++ b/src/simapy/sima/report/appendix.py @@ -6,19 +6,16 @@ from .blueprints.appendix import AppendixBlueprint from typing import Dict from ..sima import ScriptableValue -from .linkable import Linkable from .orientation import Orientation from .reportitem import ReportItem -class Appendix(ReportItem,Linkable): +class Appendix(ReportItem): """ Keyword arguments ----------------- description : str (default "") scriptableValues : List[ScriptableValue] - identifier : str - (default None) items : List[ReportItem] title : str (default None) @@ -31,7 +28,6 @@ def __init__(self , description="", pageBreakBefore=False, orientation=Orientati super().__init__(**kwargs) self.description = description self.scriptableValues = list() - self.identifier = None self.items = list() self.title = None self.pageBreakBefore = pageBreakBefore @@ -69,16 +65,6 @@ def scriptableValues(self, value: List[ScriptableValue]): raise ValueError("Expected sequense, but was " , type(value)) self.__scriptableValues = value - @property - def identifier(self) -> str: - """""" - return self.__identifier - - @identifier.setter - def identifier(self, value: str): - """Set identifier""" - self.__identifier = value - @property def items(self) -> List[ReportItem]: """""" diff --git a/src/simapy/sima/report/blueprints/appendix.py b/src/simapy/sima/report/blueprints/appendix.py index fedf415a..296b5608 100644 --- a/src/simapy/sima/report/blueprints/appendix.py +++ b/src/simapy/sima/report/blueprints/appendix.py @@ -6,16 +6,14 @@ from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from .reportitem import ReportItemBlueprint -from .linkable import LinkableBlueprint -class AppendixBlueprint(ReportItemBlueprint,LinkableBlueprint): +class AppendixBlueprint(ReportItemBlueprint): """""" def __init__(self, name="Appendix", package_path="sima/report", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("identifier","string","")) self.add_attribute(BlueprintAttribute("items","sima/report/ReportItem","",True,Dimension("*"))) self.add_attribute(Attribute("title","string","")) self.add_attribute(Attribute("pageBreakBefore","boolean","",default=False)) diff --git a/src/simapy/sima/report/blueprints/plot.py b/src/simapy/sima/report/blueprints/plot.py index 7740063d..219b4a50 100644 --- a/src/simapy/sima/report/blueprints/plot.py +++ b/src/simapy/sima/report/blueprints/plot.py @@ -16,6 +16,5 @@ def __init__(self, name="Plot", package_path="sima/report", description=""): self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("object","sima/sima/MOAO","",False)) self.add_attribute(Attribute("caption","string","Caption")) - self.add_attribute(Attribute("mergeSeries","boolean","Merge all series in one plot",default=False)) self.add_attribute(Attribute("xLabel","string","")) self.add_attribute(Attribute("yLabel","string","")) \ No newline at end of file diff --git a/src/simapy/sima/report/blueprints/section.py b/src/simapy/sima/report/blueprints/section.py index 5288aaaa..6a5b88b0 100644 --- a/src/simapy/sima/report/blueprints/section.py +++ b/src/simapy/sima/report/blueprints/section.py @@ -6,17 +6,15 @@ from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from .reportitem import ReportItemBlueprint -from .linkable import LinkableBlueprint -class SectionBlueprint(ReportItemBlueprint,LinkableBlueprint): +class SectionBlueprint(ReportItemBlueprint): """""" def __init__(self, name="Section", package_path="sima/report", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("identifier","string","")) self.add_attribute(BlueprintAttribute("items","sima/report/ReportItem","",True,Dimension("*"))) - self.add_attribute(Attribute("title","string","The title of the section.")) + self.add_attribute(Attribute("title","string","")) self.add_attribute(Attribute("pageBreakBefore","boolean","",default=False)) self.add_attribute(EnumAttribute("orientation","sima/report/Orientation","")) \ No newline at end of file diff --git a/src/simapy/sima/report/blueprints/table.py b/src/simapy/sima/report/blueprints/table.py index ee983571..931e0bd8 100644 --- a/src/simapy/sima/report/blueprints/table.py +++ b/src/simapy/sima/report/blueprints/table.py @@ -16,6 +16,5 @@ def __init__(self, name="Table", package_path="sima/report", description=""): self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("object","sima/sima/MOAO","",False)) self.add_attribute(Attribute("caption","string","Caption")) - self.add_attribute(Attribute("autoSplit","boolean","Automatically split a large table into multiple tables.",default=True)) self.add_attribute(BlueprintAttribute("columns","sima/report/TableColumn","",True,Dimension("*"))) self.add_attribute(Attribute("customisableTable","boolean","",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/report/plot.py b/src/simapy/sima/report/plot.py index 4d5a78e2..da92c2ea 100644 --- a/src/simapy/sima/report/plot.py +++ b/src/simapy/sima/report/plot.py @@ -22,21 +22,18 @@ class Plot(ReportItem): object : MOAO caption : str Caption(default None) - mergeSeries : bool - Merge all series in one plot(default False) xLabel : str (default None) yLabel : str (default None) """ - def __init__(self , description="", mergeSeries=False, **kwargs): + def __init__(self , description="", **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.object = None self.caption = None - self.mergeSeries = mergeSeries self.xLabel = None self.yLabel = None for key, value in kwargs.items(): @@ -92,16 +89,6 @@ def caption(self, value: str): """Set caption""" self.__caption = value - @property - def mergeSeries(self) -> bool: - """Merge all series in one plot""" - return self.__mergeSeries - - @mergeSeries.setter - def mergeSeries(self, value: bool): - """Set mergeSeries""" - self.__mergeSeries = bool(value) - @property def xLabel(self) -> str: """""" diff --git a/src/simapy/sima/report/section.py b/src/simapy/sima/report/section.py index eae4936b..022fdc16 100644 --- a/src/simapy/sima/report/section.py +++ b/src/simapy/sima/report/section.py @@ -6,22 +6,19 @@ from .blueprints.section import SectionBlueprint from typing import Dict from ..sima import ScriptableValue -from .linkable import Linkable from .orientation import Orientation from .reportitem import ReportItem -class Section(ReportItem,Linkable): +class Section(ReportItem): """ Keyword arguments ----------------- description : str (default "") scriptableValues : List[ScriptableValue] - identifier : str - (default None) items : List[ReportItem] title : str - The title of the section.(default None) + (default None) pageBreakBefore : bool (default False) orientation : Orientation @@ -31,7 +28,6 @@ def __init__(self , description="", pageBreakBefore=False, orientation=Orientati super().__init__(**kwargs) self.description = description self.scriptableValues = list() - self.identifier = None self.items = list() self.title = None self.pageBreakBefore = pageBreakBefore @@ -69,16 +65,6 @@ def scriptableValues(self, value: List[ScriptableValue]): raise ValueError("Expected sequense, but was " , type(value)) self.__scriptableValues = value - @property - def identifier(self) -> str: - """""" - return self.__identifier - - @identifier.setter - def identifier(self, value: str): - """Set identifier""" - self.__identifier = value - @property def items(self) -> List[ReportItem]: """""" @@ -93,7 +79,7 @@ def items(self, value: List[ReportItem]): @property def title(self) -> str: - """The title of the section.""" + """""" return self.__title @title.setter diff --git a/src/simapy/sima/report/table.py b/src/simapy/sima/report/table.py index 63e66444..e234f4ce 100644 --- a/src/simapy/sima/report/table.py +++ b/src/simapy/sima/report/table.py @@ -23,20 +23,17 @@ class Table(ReportItem): object : MOAO caption : str Caption(default None) - autoSplit : bool - Automatically split a large table into multiple tables.(default True) columns : List[TableColumn] customisableTable : bool (default False) """ - def __init__(self , description="", autoSplit=True, customisableTable=False, **kwargs): + def __init__(self , description="", customisableTable=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.object = None self.caption = None - self.autoSplit = autoSplit self.columns = list() self.customisableTable = customisableTable for key, value in kwargs.items(): @@ -92,16 +89,6 @@ def caption(self, value: str): """Set caption""" self.__caption = value - @property - def autoSplit(self) -> bool: - """Automatically split a large table into multiple tables.""" - return self.__autoSplit - - @autoSplit.setter - def autoSplit(self, value: bool): - """Set autoSplit""" - self.__autoSplit = bool(value) - @property def columns(self) -> List[TableColumn]: """""" diff --git a/src/simapy/sima/riflex/__init__.py b/src/simapy/sima/riflex/__init__.py index 5fa6e608..fa83f7fe 100644 --- a/src/simapy/sima/riflex/__init__.py +++ b/src/simapy/sima/riflex/__init__.py @@ -19,7 +19,10 @@ from .bladepitchfault import BladePitchFault # noqa from .bodyforcestorage import BodyForceStorage # noqa from .bodyforcestorageitem import BodyForceStorageItem # noqa +from .bottomcontactforcestorage import BottomContactForceStorage # noqa +from .bottomcontactstorage import BottomContactStorage # noqa from .boundarychangegroup import BoundaryChangeGroup # noqa +from .chaincrosssection import ChainCrossSection # noqa from .clay import Clay # noqa from .combinedloading import CombinedLoading # noqa from .combinedloadingproperties import CombinedLoadingProperties # noqa @@ -49,6 +52,7 @@ from .dnv_os_f201combinedloading import DNV_OS_F201CombinedLoading # noqa from .doublesymmetriccrosssection import DoubleSymmetricCrossSection # noqa from .doublesymmetriccrosssectionmassvolume import DoubleSymmetricCrossSectionMassVolume # noqa +from .doublesymmetricstiffnessdamping import DoubleSymmetricStiffnessDamping # noqa from .dragchaintype import DragChainType # noqa from .dunkirksand import DunkirkSand # noqa from .dunkirksoilcoefficients import DunkirkSoilCoefficients # noqa @@ -87,6 +91,7 @@ from .flexjointconnectortype import FlexJointConnectorType # noqa from .forceresponsestorage import ForceResponseStorage # noqa from .generalcrosssection import GeneralCrossSection # noqa +from .generalcrosssectionstiffnessdamping import GeneralCrossSectionStiffnessDamping # noqa from .geotechnical import GeoTechnical # noqa from .geotechnicallinespecification import GeotechnicalLineSpecification # noqa from .geotechnicallinespecificationitem import GeotechnicalLineSpecificationItem # noqa @@ -209,6 +214,7 @@ from .timedomainprocedure import TimeDomainProcedure # noqa from .timedomainvivloadcoefficients import TimeDomainVIVLoadCoefficients # noqa from .torsionstiffnessitem import TorsionStiffnessItem # noqa +from .touchdownpointstorage import TouchDownPointStorage # noqa from .tubularcontact import TubularContact # noqa from .turbinebladeresponsestorage import TurbineBladeResponseStorage # noqa from .turbineresponsestorage import TurbineResponseStorage # noqa @@ -239,6 +245,7 @@ from .boundaryconditionframe import BoundaryConditionFrame # noqa from .centerofwinch import CenterOfWinch # noqa from .combinedloadingapproach import CombinedLoadingApproach # noqa +from .constructiontype import ConstructionType # noqa from .contactdirection import ContactDirection # noqa from .controlparameter import ControlParameter # noqa from .convergencecriterion import ConvergenceCriterion # noqa @@ -305,6 +312,7 @@ from .soilstiffnesstype import SoilStiffnessType # noqa from .springdof import SpringDOF # noqa from .staticloadtype import StaticLoadType # noqa +from .steelgrade import SteelGrade # noqa from .stiffnesstype import StiffnessType # noqa from .storagetype import StorageType # noqa from .stressjointloadformulation import StressJointLoadFormulation # noqa diff --git a/src/simapy/sima/riflex/axisymmetriccrosssection.py b/src/simapy/sima/riflex/axisymmetriccrosssection.py index 7e4fe6a9..04ded300 100644 --- a/src/simapy/sima/riflex/axisymmetriccrosssection.py +++ b/src/simapy/sima/riflex/axisymmetriccrosssection.py @@ -94,7 +94,6 @@ class AxisymmetricCrossSection(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping temperature : float Temperature at which the specification applies(default 0.0) @@ -161,6 +160,7 @@ class AxisymmetricCrossSection(CrossSection,CRSAxialFrictionModel): Initial stiffness factor for internal friction moment(default 10.0) coupledBendingTorsion : bool Geometric stiffness coupling between bending and torsion(default False) + stiffnessDamping : CRSStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdt=0.0, cdn=0.0, cmt=0.0, cmn=0.0, cdtl=0.0, cdnl=0.0, cdx=0.0, cdy=0.0, amx=0.0, amy=0.0, cdlx=0.0, cdly=0.0, hydrodynamicRadiationInputCode=HydrodynamicInputCode.DIMENSIONAL, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, temperature=0.0, alpha=0.0, beta=0.0, defaultExpansion=True, tensionCapacity=0.0, maxCurvature=0.0, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, netWidthEnd1=0.0, netWidthEnd2=0.0, currentVelocityScaling=1.0, solidityRatio=0.0, axialStiffnessInput=AxialStiffness.CONSTANT, bendingStiffnessInput=BendingStiffness.CONSTANT, torsionStiffnessInput=TorsionStiffness.CONSTANT, pressureDependency=0, hysteresisOption=Hysteresis.NO_HYSTERESIS, hardeningParameter=0.0, axialStiffness=0.0, bendingStiffness=0.0, intFrictionMoment=0.0, shearStiffness=0.0, negativeTorsionStiffness=0.0, positiveTorsionStiffness=0.0, barBeam=BarBeam.BAR, stiffnessFactor=10.0, coupledBendingTorsion=False, **kwargs): @@ -199,7 +199,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.temperature = temperature self.alpha = alpha @@ -236,6 +235,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.barBeam = barBeam self.stiffnessFactor = stiffnessFactor self.coupledBendingTorsion = coupledBendingTorsion + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -589,16 +589,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -964,3 +954,13 @@ def coupledBendingTorsion(self) -> bool: def coupledBendingTorsion(self, value: bool): """Set coupledBendingTorsion""" self.__coupledBendingTorsion = bool(value) + + @property + def stiffnessDamping(self) -> CRSStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: CRSStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/blueprints/axisymmetriccrosssection.py b/src/simapy/sima/riflex/blueprints/axisymmetriccrosssection.py index b782bb25..3f2c84e9 100644 --- a/src/simapy/sima/riflex/blueprints/axisymmetriccrosssection.py +++ b/src/simapy/sima/riflex/blueprints/axisymmetriccrosssection.py @@ -47,7 +47,6 @@ def __init__(self, name="AxisymmetricCrossSection", package_path="sima/riflex", self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("temperature","number","Temperature at which the specification applies",default=0.0)) self.add_attribute(Attribute("alpha","number","Thermal expansion coefficient",default=0.0)) @@ -83,4 +82,5 @@ def __init__(self, name="AxisymmetricCrossSection", package_path="sima/riflex", self.add_attribute(BlueprintAttribute("torsionStiffnessCharacteristics","sima/riflex/TorsionStiffnessItem","",True,Dimension("*"))) self.add_attribute(EnumAttribute("barBeam","sima/riflex/BarBeam","Cross section type")) self.add_attribute(Attribute("stiffnessFactor","number","Initial stiffness factor for internal friction moment",default=10.0)) - self.add_attribute(Attribute("coupledBendingTorsion","boolean","Geometric stiffness coupling between bending and torsion",default=False)) \ No newline at end of file + self.add_attribute(Attribute("coupledBendingTorsion","boolean","Geometric stiffness coupling between bending and torsion",default=False)) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/bottomcontactforcestorage.py b/src/simapy/sima/riflex/blueprints/bottomcontactforcestorage.py new file mode 100644 index 00000000..aa79bde9 --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/bottomcontactforcestorage.py @@ -0,0 +1,23 @@ +# +# Generated with BottomContactForceStorageBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .elementreference import ElementReferenceBlueprint + +class BottomContactForceStorageBlueprint(ElementReferenceBlueprint): + """""" + + def __init__(self, name="BottomContactForceStorage", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("line","sima/riflex/ARLine","Line",False)) + self.add_attribute(Attribute("segment","integer","Segment on given line",default=1)) + self.add_attribute(Attribute("allSegments","boolean","All segments",default=False)) + self.add_attribute(Attribute("elementNumber","integer","Local element number on actual segment",default=1)) + self.add_attribute(Attribute("allElements","boolean","All elements",default=False)) + self.add_attribute(Attribute("allEnds","boolean","All ends",default=False)) + self.add_attribute(EnumAttribute("elementEnd","sima/riflex/End","End number 1 or 2")) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/bottomcontactstorage.py b/src/simapy/sima/riflex/blueprints/bottomcontactstorage.py new file mode 100644 index 00000000..c5c64138 --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/bottomcontactstorage.py @@ -0,0 +1,21 @@ +# +# Generated with BottomContactStorageBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.moao import MOAOBlueprint + +class BottomContactStorageBlueprint(MOAOBlueprint): + """""" + + def __init__(self, name="BottomContactStorage", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("store","boolean","Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements",default=False)) + self.add_attribute(Attribute("storageStep","integer","Code for storage of internal forces. Storage for every given.",default=1)) + self.add_attribute(EnumAttribute("format","sima/riflex/FileFormatCode","Format code for additional output of time series")) + self.add_attribute(BlueprintAttribute("forces","sima/riflex/BottomContactForceStorage","Specification of nodes for displacement storage",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("touchDownPoints","sima/riflex/TouchDownPointStorage","Specification of nodes for displacement storage",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/chaincrosssection.py b/src/simapy/sima/riflex/blueprints/chaincrosssection.py new file mode 100644 index 00000000..e2c935ac --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/chaincrosssection.py @@ -0,0 +1,20 @@ +# +# Generated with ChainCrossSectionBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .crosssection import CrossSectionBlueprint + +class ChainCrossSectionBlueprint(CrossSectionBlueprint): + """""" + + def __init__(self, name="ChainCrossSection", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("diameter","number","Chain diameter",default=0.0)) + self.add_attribute(EnumAttribute("steelGrade","sima/riflex/SteelGrade","")) + self.add_attribute(EnumAttribute("constructionType","sima/riflex/ConstructionType","")) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/coupledaxialtorsionstrainmodel.py b/src/simapy/sima/riflex/blueprints/coupledaxialtorsionstrainmodel.py index 9dfcbf19..f6598461 100644 --- a/src/simapy/sima/riflex/blueprints/coupledaxialtorsionstrainmodel.py +++ b/src/simapy/sima/riflex/blueprints/coupledaxialtorsionstrainmodel.py @@ -47,7 +47,6 @@ def __init__(self, name="CoupledAxialTorsionStrainModel", package_path="sima/rif self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("temperature","number","Temperature at which the specification applies",default=0.0)) self.add_attribute(Attribute("alpha","number","Thermal expansion coefficient",default=0.0)) @@ -69,4 +68,5 @@ def __init__(self, name="CoupledAxialTorsionStrainModel", package_path="sima/rif self.add_attribute(Attribute("intFrictionMoment","number","Internal friction moment.",default=10.0)) self.add_attribute(Attribute("stiffnessFactor","number","Initial stiffness factor for internal friction moment",default=10.0)) self.add_attribute(BlueprintAttribute("coupledAxialTorsionItems","sima/riflex/CoupledAxialTorsionStrainItem","",True,Dimension("*"))) - self.add_attribute(Attribute("tensionTorsionCoupling","number"," Tension/torsion coupling parameter",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("tensionTorsionCoupling","number"," Tension/torsion coupling parameter",default=0.0)) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/crsmassdamping.py b/src/simapy/sima/riflex/blueprints/crsmassdamping.py index 88df28cd..9b27095c 100644 --- a/src/simapy/sima/riflex/blueprints/crsmassdamping.py +++ b/src/simapy/sima/riflex/blueprints/crsmassdamping.py @@ -16,4 +16,4 @@ def __init__(self, name="CRSMassDamping", package_path="sima/riflex", descriptio self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("axialFactor","number","Factor for mass proportional damping in axial dof",default=0.0)) self.add_attribute(Attribute("torsionalFactor","number","Factor for mass proportional damping in torsional dof",default=0.0)) - self.add_attribute(Attribute("bendingFactor","number","Factor for mass proportional damping in bending dof",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("bendingFactor","number","Factor for mass proportional damping in bending/shear dofs",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/crsstiffnessdamping.py b/src/simapy/sima/riflex/blueprints/crsstiffnessdamping.py index 6ddaf92f..6ac2f014 100644 --- a/src/simapy/sima/riflex/blueprints/crsstiffnessdamping.py +++ b/src/simapy/sima/riflex/blueprints/crsstiffnessdamping.py @@ -16,5 +16,5 @@ def __init__(self, name="CRSStiffnessDamping", package_path="sima/riflex", descr self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("axialFactor","number","Factor for stiffness proportional damping in axial dof",default=0.0)) self.add_attribute(Attribute("torsionalFactor","number","Factor for stiffness proportional damping in torsional dof",default=0.0)) - self.add_attribute(Attribute("bendingFactor","number","Factor for stiffness proportional damping in bending dof",default=0.0)) + self.add_attribute(Attribute("bendingFactor","number","Factor for stiffness proportional damping in bending/shear dofs",default=0.0)) self.add_attribute(EnumAttribute("option","sima/riflex/RayleighDamping","Stiffness proportional damping options")) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/doublesymmetriccrosssection.py b/src/simapy/sima/riflex/blueprints/doublesymmetriccrosssection.py index 27c1ae03..b70b3bbb 100644 --- a/src/simapy/sima/riflex/blueprints/doublesymmetriccrosssection.py +++ b/src/simapy/sima/riflex/blueprints/doublesymmetriccrosssection.py @@ -47,7 +47,6 @@ def __init__(self, name="DoubleSymmetricCrossSection", package_path="sima/riflex self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("cdax","number","Quadratic aerodynamic drag force coefficient per unit length in tangential direction",default=0.0)) self.add_attribute(Attribute("cday","number","Quadratic aerodynamic drag force coefficient per unit length in normal direction",default=0.0)) @@ -81,4 +80,5 @@ def __init__(self, name="DoubleSymmetricCrossSection", package_path="sima/riflex self.add_attribute(Attribute("bendingStiffnessZ","number","Bending stiffness around z-axis",default=0.0)) self.add_attribute(Attribute("shearStiffnessZ","number","Shear stiffness in Z-direction",default=0.0)) self.add_attribute(Attribute("shearStiffnessY","number","Shear stiffness in Y-direction",default=0.0)) - self.add_attribute(EnumAttribute("hydrodynamicRadiationInputCode","sima/riflex/HydrodynamicInputCode","Code for input of simplified radiation force coefficients")) \ No newline at end of file + self.add_attribute(EnumAttribute("hydrodynamicRadiationInputCode","sima/riflex/HydrodynamicInputCode","Code for input of simplified radiation force coefficients")) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/DoubleSymmetricStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/doublesymmetricstiffnessdamping.py b/src/simapy/sima/riflex/blueprints/doublesymmetricstiffnessdamping.py new file mode 100644 index 00000000..ceae6026 --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/doublesymmetricstiffnessdamping.py @@ -0,0 +1,21 @@ +# +# Generated with DoubleSymmetricStiffnessDampingBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.moao import MOAOBlueprint + +class DoubleSymmetricStiffnessDampingBlueprint(MOAOBlueprint): + """""" + + def __init__(self, name="DoubleSymmetricStiffnessDamping", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("axialFactor","number","Factor for stiffness proportional damping in axial dof",default=0.0)) + self.add_attribute(Attribute("torsionalFactor","number","Factor for stiffness proportional damping in torsional dof",default=0.0)) + self.add_attribute(Attribute("bendingFactorY","number","Factor for stiffness proportional damping for bending around local Y-axis and shear in local Z-axis",default=0.0)) + self.add_attribute(Attribute("bendingFactorZ","number","Factor for stiffness proportional damping for bending around local Z-axis and shear in local Y-axis",default=0.0)) + self.add_attribute(EnumAttribute("option","sima/riflex/RayleighDamping","Stiffness proportional damping options")) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/fatigueproperties.py b/src/simapy/sima/riflex/blueprints/fatigueproperties.py index e4074fa6..69db8b8f 100644 --- a/src/simapy/sima/riflex/blueprints/fatigueproperties.py +++ b/src/simapy/sima/riflex/blueprints/fatigueproperties.py @@ -15,7 +15,7 @@ def __init__(self, name="FatigueProperties", package_path="sima/riflex", descrip self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(EnumAttribute("calculationOption","sima/riflex/FatigueCalculationOption","")) - self.add_attribute(Attribute("numCrossSectionPoints","integer","Number of points around cross-section where fatigue is",default=0)) + self.add_attribute(Attribute("numCrossSectionPoints","integer","Number of points around cross-section where fatigue is",default=8)) self.add_attribute(EnumAttribute("resultPrintOption","sima/riflex/ResultPrintOption","")) self.add_attribute(EnumAttribute("timeSeriesPrintOption","sima/riflex/TimeSeriesPrintOption","Optional tension/curvature export to ascci file ( viv_tension_curvature_ts.txt )")) self.add_attribute(Attribute("timeSeriesLength","number","Length of stress time series to be generated for fatigue calculation",default=0.0)) diff --git a/src/simapy/sima/riflex/blueprints/fibrerope.py b/src/simapy/sima/riflex/blueprints/fibrerope.py index 96cd55f5..516c7fca 100644 --- a/src/simapy/sima/riflex/blueprints/fibrerope.py +++ b/src/simapy/sima/riflex/blueprints/fibrerope.py @@ -47,7 +47,6 @@ def __init__(self, name="FibreRope", package_path="sima/riflex", description="") self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("temperature","number","Temperature at which the specification applies",default=0.0)) self.add_attribute(Attribute("alpha","number","Thermal expansion coefficient",default=0.0)) @@ -62,4 +61,5 @@ def __init__(self, name="FibreRope", package_path="sima/riflex", description="") self.add_attribute(Attribute("aerodynamicDiameter","number","Aerodynamic diameter",default=0.0)) self.add_attribute(BlueprintAttribute("massVolume","sima/riflex/FibreRopeMassVolume","",True)) self.add_attribute(Attribute("tmax","number","",default=0.0)) - self.add_attribute(BlueprintAttribute("fibreRopeModel","sima/simo/FibreRopeModel","",False)) \ No newline at end of file + self.add_attribute(BlueprintAttribute("fibreRopeModel","sima/simo/FibreRopeModel","",False)) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/forceresponsestorage.py b/src/simapy/sima/riflex/blueprints/forceresponsestorage.py index 4e59117e..35a95ff7 100644 --- a/src/simapy/sima/riflex/blueprints/forceresponsestorage.py +++ b/src/simapy/sima/riflex/blueprints/forceresponsestorage.py @@ -21,5 +21,4 @@ def __init__(self, name="ForceResponseStorage", package_path="sima/riflex", desc self.add_attribute(Attribute("readTransformationMatrices","boolean","Make transformation matrices available in the post processor",default=False)) self.add_attribute(BlueprintAttribute("relativeElementAngles","sima/riflex/RelativeElementAngle","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("elementAngles","sima/riflex/ElementAngle","",True,Dimension("*"))) - self.add_attribute(Attribute("storeBottomContactForces","boolean","Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements",default=False)) self.add_attribute(BlueprintAttribute("transformations","sima/riflex/ElementTransformation","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/generalcrosssection.py b/src/simapy/sima/riflex/blueprints/generalcrosssection.py index 892ea3a6..96c51aa8 100644 --- a/src/simapy/sima/riflex/blueprints/generalcrosssection.py +++ b/src/simapy/sima/riflex/blueprints/generalcrosssection.py @@ -47,7 +47,6 @@ def __init__(self, name="GeneralCrossSection", package_path="sima/riflex", descr self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("cdax","number","Quadratic aerodynamic drag force coefficient per unit length in tangential direction",default=0.0)) self.add_attribute(Attribute("cday","number","Quadratic aerodynamic drag force coefficient per unit length in normal direction",default=0.0)) @@ -85,4 +84,5 @@ def __init__(self, name="GeneralCrossSection", package_path="sima/riflex", descr self.add_attribute(Attribute("bendingStiffnessV","number","Bending stiffness around principal V-axis",default=0.0)) self.add_attribute(Attribute("bendingStiffnessW","number","Bending stiffness around principal W-axis",default=0.0)) self.add_attribute(Attribute("shearStiffnessW","number","Shear stiffness in principal W-direction. Infinite shear stiffness if equal to zero",default=0.0)) - self.add_attribute(Attribute("shearStiffnessV","number","Shear stiffness in principal V-direction. Infinite shear stiffness if equal to zero",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("shearStiffnessV","number","Shear stiffness in principal V-direction. Infinite shear stiffness if equal to zero",default=0.0)) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/GeneralCrossSectionStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/generalcrosssectionstiffnessdamping.py b/src/simapy/sima/riflex/blueprints/generalcrosssectionstiffnessdamping.py new file mode 100644 index 00000000..b2207c37 --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/generalcrosssectionstiffnessdamping.py @@ -0,0 +1,20 @@ +# +# Generated with GeneralCrossSectionStiffnessDampingBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.moao import MOAOBlueprint + +class GeneralCrossSectionStiffnessDampingBlueprint(MOAOBlueprint): + """""" + + def __init__(self, name="GeneralCrossSectionStiffnessDamping", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("axialFactor","number","Factor for stiffness proportional damping in axial dof",default=0.0)) + self.add_attribute(Attribute("torsionalFactor","number","Factor for stiffness proportional damping in torsional dof",default=0.0)) + self.add_attribute(Attribute("bendingFactorV","number","Factor for stiffness proportional damping for bending around principal V-axis and shear in principal W-axis",default=0.0)) + self.add_attribute(Attribute("bendingFactorW","number","Factor for stiffness proportional damping for bending around principal W-axis and shear in principal V-axis",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/geotechnicalspring.py b/src/simapy/sima/riflex/blueprints/geotechnicalspring.py index 6b276d50..f987e737 100644 --- a/src/simapy/sima/riflex/blueprints/geotechnicalspring.py +++ b/src/simapy/sima/riflex/blueprints/geotechnicalspring.py @@ -23,5 +23,4 @@ def __init__(self, name="GeotechnicalSpring", package_path="sima/riflex", descri self.add_attribute(Attribute("name","string","")) self.add_attribute(BlueprintAttribute("stiffnessItems","sima/riflex/GeotechnicalSpringStiffnessItem","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("dampingDisplacementItems","sima/riflex/DampingDisplacementItem","",True,Dimension("*"))) - self.add_attribute(Attribute("strainVelocityExponent","number","",default=1.0)) - self.add_attribute(Attribute("relativeLength","number","Relative length for result scaling",default=1.0)) \ No newline at end of file + self.add_attribute(Attribute("velocityExponent","number","Exponent of velocity in damping calculation",default=1.0)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/globalspringstiffnessitem.py b/src/simapy/sima/riflex/blueprints/globalspringstiffnessitem.py index 64a2725d..aa3573eb 100644 --- a/src/simapy/sima/riflex/blueprints/globalspringstiffnessitem.py +++ b/src/simapy/sima/riflex/blueprints/globalspringstiffnessitem.py @@ -14,5 +14,5 @@ def __init__(self, name="GlobalSpringStiffnessItem", package_path="sima/riflex", super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("force","number","Spring force / moment corresponding to.",default=0.0)) - self.add_attribute(Attribute("displacement","number","Spring displacement.",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("force","number","",default=0.0)) + self.add_attribute(Attribute("displacement","number","",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/horizontalaxiscontroller.py b/src/simapy/sima/riflex/blueprints/horizontalaxiscontroller.py index cedda101..022432fb 100644 --- a/src/simapy/sima/riflex/blueprints/horizontalaxiscontroller.py +++ b/src/simapy/sima/riflex/blueprints/horizontalaxiscontroller.py @@ -20,6 +20,7 @@ def __init__(self, name="HorizontalAxisController", package_path="sima/riflex", self.add_attribute(Attribute("ratedOmega","number","Rated electrical omega",default=0.0)) self.add_attribute(Attribute("ratedTorque","number","Rated electrical torque",default=0.0)) self.add_attribute(Attribute("gearBoxRatio","number","Gear box ratio",default=0.0)) + self.add_attribute(Attribute("generatorEfficiency","number","Generator efficiency due to electrical and mechanical losses",default=1.0)) self.add_attribute(Attribute("maxPitchRate","number","Maximum pitch rate",default=0.0)) self.add_attribute(Attribute("maxPitch","number","Maximum pitch",default=0.0)) self.add_attribute(Attribute("maxTorqueRate","number","Maximum torque rate",default=0.0)) diff --git a/src/simapy/sima/riflex/blueprints/riflexdynamiccalculationparameters.py b/src/simapy/sima/riflex/blueprints/riflexdynamiccalculationparameters.py index 8cd43741..2a932645 100644 --- a/src/simapy/sima/riflex/blueprints/riflexdynamiccalculationparameters.py +++ b/src/simapy/sima/riflex/blueprints/riflexdynamiccalculationparameters.py @@ -46,4 +46,5 @@ def __init__(self, name="RIFLEXDynamicCalculationParameters", package_path="sima self.add_attribute(Attribute("specifiedForcesScaling","number","Scaling of specified (nodal) forces.",default=1.0)) self.add_attribute(Attribute("currentVelocitiesScaling","number","Scaling of current velocities.",default=1.0)) self.add_attribute(Attribute("changeStaticLoads","boolean","Change applied static loads at the start of the dynamic analysis",default=False)) - self.add_attribute(BlueprintAttribute("dynamicLoads","sima/riflex/DynamicLoads","",True)) \ No newline at end of file + self.add_attribute(BlueprintAttribute("dynamicLoads","sima/riflex/DynamicLoads","",True)) + self.add_attribute(BlueprintAttribute("bottomContactStorage","sima/riflex/BottomContactStorage","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/riflextask.py b/src/simapy/sima/riflex/blueprints/riflextask.py index 1fc9ba4f..f3ae1f58 100644 --- a/src/simapy/sima/riflex/blueprints/riflextask.py +++ b/src/simapy/sima/riflex/blueprints/riflextask.py @@ -28,7 +28,6 @@ def __init__(self, name="RIFLEXTask", package_path="sima/riflex", description="" self.add_attribute(Attribute("simoMemory","integer","Enables override of the default memory settings for SIMO. Given in MB",default=128)) self.add_attribute(Attribute("removeIntermediateFiles","boolean","",default=True)) self.add_attribute(EnumAttribute("exportMassUnit","sima/simo/MassUnit","Used as export unit for mass ( and indirectly force)")) - self.add_attribute(Attribute("exportAsFMU","boolean","Generate FMU (Functional Mockup Unit) from model",default=False)) self.add_attribute(Attribute("riflexStamodMemory","integer","Enables override of the default memory settings. Given in MB",default=512)) self.add_attribute(Attribute("numRiflexStamodArrays","integer","Enables override of the default memory settings",default=20000)) self.add_attribute(Attribute("riflexDynmodMemory","integer","Enables override of the default memory settings. Given in MB. Also used for VIVANA and Eigenvalue analysis",default=512)) diff --git a/src/simapy/sima/riflex/blueprints/staticloadtypeitem.py b/src/simapy/sima/riflex/blueprints/staticloadtypeitem.py index 0c2268e3..6827e4d2 100644 --- a/src/simapy/sima/riflex/blueprints/staticloadtypeitem.py +++ b/src/simapy/sima/riflex/blueprints/staticloadtypeitem.py @@ -15,7 +15,6 @@ def __init__(self, name="StaticLoadTypeItem", package_path="sima/riflex", descri self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("runWithPrevious","boolean","Run the load group together with the last",default=False)) - self.add_attribute(BlueprintAttribute("boundaryChangeGroup","sima/riflex/BoundaryChangeGroup","",True)) self.add_attribute(EnumAttribute("loadType","sima/riflex/StaticLoadType","Load Type")) self.add_attribute(Attribute("nStep","integer","Number of load steps",default=10)) self.add_attribute(Attribute("maxIterations","integer","Maximum number of iterations during application of load",default=10)) @@ -23,6 +22,7 @@ def __init__(self, name="StaticLoadTypeItem", package_path="sima/riflex", descri self.add_attribute(EnumAttribute("convergenceNorm","sima/riflex/ConvergenceNorm","")) self.add_attribute(Attribute("energyAccuracy","number"," Required accuracy measured by energy norm. Value is not used if convergence norm is 'Displacement'.",default=1e-05)) self.add_attribute(Attribute("entered","boolean","start condition for pipe-in-pipe contact",default=True)) + self.add_attribute(BlueprintAttribute("boundaryChangeGroup","sima/riflex/BoundaryChangeGroup","",True)) self.add_attribute(BlueprintAttribute("temperatureVariations","sima/riflex/TemperatureVariationItem","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("pressureVariations","sima/riflex/PressureVariationItem","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("winchVariations","sima/riflex/WinchVariationItem","",True,Dimension("*"))) diff --git a/src/simapy/sima/riflex/blueprints/thinwalledpipe.py b/src/simapy/sima/riflex/blueprints/thinwalledpipe.py index 81bd8b81..e67f772b 100644 --- a/src/simapy/sima/riflex/blueprints/thinwalledpipe.py +++ b/src/simapy/sima/riflex/blueprints/thinwalledpipe.py @@ -47,7 +47,6 @@ def __init__(self, name="ThinWalledPipe", package_path="sima/riflex", descriptio self.add_attribute(Attribute("stiffnessDampingSpecification","boolean","Stiffness proportional Rayleigh damping",default=False)) self.add_attribute(Attribute("axialDampingSpecification","boolean","Local axial damping model",default=False)) self.add_attribute(BlueprintAttribute("massDamping","sima/riflex/CRSMassDamping","",True)) - self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) self.add_attribute(BlueprintAttribute("axialDamping","sima/riflex/CRSAxialDamping","",True)) self.add_attribute(Attribute("temperature","number","Temperature at which the specification applies",default=0.0)) self.add_attribute(Attribute("alpha","number","Thermal expansion coefficient",default=0.0)) @@ -71,4 +70,5 @@ def __init__(self, name="ThinWalledPipe", package_path="sima/riflex", descriptio self.add_attribute(BlueprintAttribute("materialProperties","sima/riflex/ThinWalledPipeMaterial","",True)) self.add_attribute(Attribute("calculateBeta","boolean","Let RIFLEX calculate beta",default=False)) self.add_attribute(EnumAttribute("diameterType","sima/riflex/InnerOuter","Inner or outer diameter")) - self.add_attribute(Attribute("coupledBendingTorsion","boolean","Geometric stiffness coupling between bending and torsion",default=False)) \ No newline at end of file + self.add_attribute(Attribute("coupledBendingTorsion","boolean","Geometric stiffness coupling between bending and torsion",default=False)) + self.add_attribute(BlueprintAttribute("stiffnessDamping","sima/riflex/CRSStiffnessDamping","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/touchdownpointstorage.py b/src/simapy/sima/riflex/blueprints/touchdownpointstorage.py new file mode 100644 index 00000000..79a0c92a --- /dev/null +++ b/src/simapy/sima/riflex/blueprints/touchdownpointstorage.py @@ -0,0 +1,18 @@ +# +# Generated with TouchDownPointStorageBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .linereference import LineReferenceBlueprint + +class TouchDownPointStorageBlueprint(LineReferenceBlueprint): + """""" + + def __init__(self, name="TouchDownPointStorage", package_path="sima/riflex", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("line","sima/riflex/ARLine","Line",False)) + self.add_attribute(Attribute("numberOfElements","integer","Additional bottom contact forces for a selected number of elements next to the TDP element",default=0)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/blueprints/windturbine.py b/src/simapy/sima/riflex/blueprints/windturbine.py index 405d770a..0dce5108 100644 --- a/src/simapy/sima/riflex/blueprints/windturbine.py +++ b/src/simapy/sima/riflex/blueprints/windturbine.py @@ -29,6 +29,8 @@ def __init__(self, name="WindTurbine", package_path="sima/riflex", description=" self.add_attribute(Attribute("prandtlTip","boolean","The correction for tip loss due to the finite number of blades may be applied or removed.",default=True)) self.add_attribute(Attribute("prandtlRoot","boolean","The correction for hub loss due to the finite number of blades may be applied or removed.",default=False)) self.add_attribute(Attribute("prandtlYaw","boolean","If yaw correction is selected, the Prandtl factor is modified based on the angle between the incoming wind and the rotor plane.",default=True)) + self.add_attribute(Attribute("skewedWake","boolean","If skewed wake factor is selected, user can define yaw correction in BEM",default=False)) + self.add_attribute(Attribute("skewedWakeFactor","number","Skewed wake factor",default=1.0)) self.add_attribute(BlueprintAttribute("measurementNodes","sima/riflex/MeasurementNode","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("measurementElements","sima/riflex/MeasurementElement","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("yawController","sima/riflex/HorizontalAxisYawController","",True)) \ No newline at end of file diff --git a/src/simapy/sima/riflex/bottomcontactforcestorage.py b/src/simapy/sima/riflex/bottomcontactforcestorage.py new file mode 100644 index 00000000..fc4606a7 --- /dev/null +++ b/src/simapy/sima/riflex/bottomcontactforcestorage.py @@ -0,0 +1,151 @@ +# This an autogenerated file +# +# Generated with BottomContactForceStorage +from __future__ import annotations +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.bottomcontactforcestorage import BottomContactForceStorageBlueprint +from typing import Dict +from ..sima import ScriptableValue +from .elementreference import ElementReference +from .end import End +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from .arline import ARLine + +class BottomContactForceStorage(ElementReference): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + line : ARLine + Line + segment : int + Segment on given line(default 1) + allSegments : bool + All segments(default False) + elementNumber : int + Local element number on actual segment(default 1) + allElements : bool + All elements(default False) + allEnds : bool + All ends(default False) + elementEnd : End + End number 1 or 2 + """ + + def __init__(self , description="", segment=1, allSegments=False, elementNumber=1, allElements=False, allEnds=False, elementEnd=End.ONE, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.line = None + self.segment = segment + self.allSegments = allSegments + self.elementNumber = elementNumber + self.allElements = allElements + self.allEnds = allEnds + self.elementEnd = elementEnd + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return BottomContactForceStorageBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def line(self) -> ARLine: + """Line""" + return self.__line + + @line.setter + def line(self, value: ARLine): + """Set line""" + self.__line = value + + @property + def segment(self) -> int: + """Segment on given line""" + return self.__segment + + @segment.setter + def segment(self, value: int): + """Set segment""" + self.__segment = int(value) + + @property + def allSegments(self) -> bool: + """All segments""" + return self.__allSegments + + @allSegments.setter + def allSegments(self, value: bool): + """Set allSegments""" + self.__allSegments = bool(value) + + @property + def elementNumber(self) -> int: + """Local element number on actual segment""" + return self.__elementNumber + + @elementNumber.setter + def elementNumber(self, value: int): + """Set elementNumber""" + self.__elementNumber = int(value) + + @property + def allElements(self) -> bool: + """All elements""" + return self.__allElements + + @allElements.setter + def allElements(self, value: bool): + """Set allElements""" + self.__allElements = bool(value) + + @property + def allEnds(self) -> bool: + """All ends""" + return self.__allEnds + + @allEnds.setter + def allEnds(self, value: bool): + """Set allEnds""" + self.__allEnds = bool(value) + + @property + def elementEnd(self) -> End: + """End number 1 or 2""" + return self.__elementEnd + + @elementEnd.setter + def elementEnd(self, value: End): + """Set elementEnd""" + self.__elementEnd = value diff --git a/src/simapy/sima/riflex/bottomcontactstorage.py b/src/simapy/sima/riflex/bottomcontactstorage.py new file mode 100644 index 00000000..c9c96366 --- /dev/null +++ b/src/simapy/sima/riflex/bottomcontactstorage.py @@ -0,0 +1,127 @@ +# This an autogenerated file +# +# Generated with BottomContactStorage +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.bottomcontactstorage import BottomContactStorageBlueprint +from typing import Dict +from ..sima import MOAO +from ..sima import ScriptableValue +from .bottomcontactforcestorage import BottomContactForceStorage +from .fileformatcode import FileFormatCode +from .touchdownpointstorage import TouchDownPointStorage + +class BottomContactStorage(MOAO): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + store : bool + Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements(default False) + storageStep : int + Code for storage of internal forces. Storage for every given.(default 1) + format : FileFormatCode + Format code for additional output of time series + forces : List[BottomContactForceStorage] + Specification of nodes for displacement storage + touchDownPoints : List[TouchDownPointStorage] + Specification of nodes for displacement storage + """ + + def __init__(self , description="", store=False, storageStep=1, format=FileFormatCode.BINARY_OUTPUT_ONLY, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.store = store + self.storageStep = storageStep + self.format = format + self.forces = list() + self.touchDownPoints = list() + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return BottomContactStorageBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def store(self) -> bool: + """Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements""" + return self.__store + + @store.setter + def store(self, value: bool): + """Set store""" + self.__store = bool(value) + + @property + def storageStep(self) -> int: + """Code for storage of internal forces. Storage for every given.""" + return self.__storageStep + + @storageStep.setter + def storageStep(self, value: int): + """Set storageStep""" + self.__storageStep = int(value) + + @property + def format(self) -> FileFormatCode: + """Format code for additional output of time series""" + return self.__format + + @format.setter + def format(self, value: FileFormatCode): + """Set format""" + self.__format = value + + @property + def forces(self) -> List[BottomContactForceStorage]: + """Specification of nodes for displacement storage""" + return self.__forces + + @forces.setter + def forces(self, value: List[BottomContactForceStorage]): + """Set forces""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__forces = value + + @property + def touchDownPoints(self) -> List[TouchDownPointStorage]: + """Specification of nodes for displacement storage""" + return self.__touchDownPoints + + @touchDownPoints.setter + def touchDownPoints(self, value: List[TouchDownPointStorage]): + """Set touchDownPoints""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__touchDownPoints = value diff --git a/src/simapy/sima/riflex/chaincrosssection.py b/src/simapy/sima/riflex/chaincrosssection.py new file mode 100644 index 00000000..623e2cc7 --- /dev/null +++ b/src/simapy/sima/riflex/chaincrosssection.py @@ -0,0 +1,107 @@ +# This an autogenerated file +# +# Generated with ChainCrossSection +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.chaincrosssection import ChainCrossSectionBlueprint +from typing import Dict +from ..sima import ScriptableValue +from .constructiontype import ConstructionType +from .crosssection import CrossSection +from .steelgrade import SteelGrade + +class ChainCrossSection(CrossSection): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + diameter : float + Chain diameter(default 0.0) + steelGrade : SteelGrade + constructionType : ConstructionType + """ + + def __init__(self , description="", diameter=0.0, steelGrade=SteelGrade.R3, constructionType=ConstructionType.STUDLESS, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.diameter = diameter + self.steelGrade = steelGrade + self.constructionType = constructionType + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return ChainCrossSectionBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def diameter(self) -> float: + """Chain diameter""" + return self.__diameter + + @diameter.setter + def diameter(self, value: float): + """Set diameter""" + self.__diameter = float(value) + + @property + def steelGrade(self) -> SteelGrade: + """""" + return self.__steelGrade + + @steelGrade.setter + def steelGrade(self, value: SteelGrade): + """Set steelGrade""" + self.__steelGrade = value + + @property + def constructionType(self) -> ConstructionType: + """""" + return self.__constructionType + + @constructionType.setter + def constructionType(self, value: ConstructionType): + """Set constructionType""" + self.__constructionType = value diff --git a/src/simapy/sima/riflex/constructiontype.py b/src/simapy/sima/riflex/constructiontype.py new file mode 100644 index 00000000..389f9bf2 --- /dev/null +++ b/src/simapy/sima/riflex/constructiontype.py @@ -0,0 +1,15 @@ +# Generated with ConstructionType +# +from enum import Enum +from enum import auto + +class ConstructionType(Enum): + """""" + STUDLESS = auto() + STUDLINK = auto() + + def label(self): + if self == ConstructionType.STUDLESS: + return "Studless" + if self == ConstructionType.STUDLINK: + return "StudLink" \ No newline at end of file diff --git a/src/simapy/sima/riflex/coupledaxialtorsionstrainmodel.py b/src/simapy/sima/riflex/coupledaxialtorsionstrainmodel.py index 1729df2f..47040573 100644 --- a/src/simapy/sima/riflex/coupledaxialtorsionstrainmodel.py +++ b/src/simapy/sima/riflex/coupledaxialtorsionstrainmodel.py @@ -88,7 +88,6 @@ class CoupledAxialTorsionStrainModel(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping temperature : float Temperature at which the specification applies(default 0.0) @@ -129,6 +128,7 @@ class CoupledAxialTorsionStrainModel(CrossSection,CRSAxialFrictionModel): coupledAxialTorsionItems : List[CoupledAxialTorsionStrainItem] tensionTorsionCoupling : float Tension/torsion coupling parameter(default 0.0) + stiffnessDamping : CRSStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdt=0.0, cdn=0.0, cmt=0.0, cmn=0.0, cdtl=0.0, cdnl=0.0, cdx=0.0, cdy=0.0, amx=0.0, amy=0.0, cdlx=0.0, cdly=0.0, hydrodynamicRadiationInputCode=HydrodynamicInputCode.DIMENSIONAL, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, temperature=0.0, alpha=0.0, beta=0.0, defaultExpansion=True, tensionCapacity=0.0, maxCurvature=0.0, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, axialStiffnessInput=AxialStiffness.CONSTANT, axialStiffness=0.0, torsionStiffness=0.0, bendingStiffness=0.0, intFrictionMoment=10.0, stiffnessFactor=10.0, tensionTorsionCoupling=0.0, **kwargs): @@ -167,7 +167,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.temperature = temperature self.alpha = alpha @@ -190,6 +189,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessFactor = stiffnessFactor self.coupledAxialTorsionItems = list() self.tensionTorsionCoupling = tensionTorsionCoupling + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -543,16 +543,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -774,3 +764,13 @@ def tensionTorsionCoupling(self) -> float: def tensionTorsionCoupling(self, value: float): """Set tensionTorsionCoupling""" self.__tensionTorsionCoupling = float(value) + + @property + def stiffnessDamping(self) -> CRSStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: CRSStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/crsmassdamping.py b/src/simapy/sima/riflex/crsmassdamping.py index 54b3ff93..b9bb7648 100644 --- a/src/simapy/sima/riflex/crsmassdamping.py +++ b/src/simapy/sima/riflex/crsmassdamping.py @@ -20,7 +20,7 @@ class CRSMassDamping(MOAO): torsionalFactor : float Factor for mass proportional damping in torsional dof(default 0.0) bendingFactor : float - Factor for mass proportional damping in bending dof(default 0.0) + Factor for mass proportional damping in bending/shear dofs(default 0.0) """ def __init__(self , description="", axialFactor=0.0, torsionalFactor=0.0, bendingFactor=0.0, **kwargs): @@ -85,7 +85,7 @@ def torsionalFactor(self, value: float): @property def bendingFactor(self) -> float: - """Factor for mass proportional damping in bending dof""" + """Factor for mass proportional damping in bending/shear dofs""" return self.__bendingFactor @bendingFactor.setter diff --git a/src/simapy/sima/riflex/crsstiffnessdamping.py b/src/simapy/sima/riflex/crsstiffnessdamping.py index 2ff20911..ae779a26 100644 --- a/src/simapy/sima/riflex/crsstiffnessdamping.py +++ b/src/simapy/sima/riflex/crsstiffnessdamping.py @@ -21,7 +21,7 @@ class CRSStiffnessDamping(MOAO): torsionalFactor : float Factor for stiffness proportional damping in torsional dof(default 0.0) bendingFactor : float - Factor for stiffness proportional damping in bending dof(default 0.0) + Factor for stiffness proportional damping in bending/shear dofs(default 0.0) option : RayleighDamping Stiffness proportional damping options """ @@ -89,7 +89,7 @@ def torsionalFactor(self, value: float): @property def bendingFactor(self) -> float: - """Factor for stiffness proportional damping in bending dof""" + """Factor for stiffness proportional damping in bending/shear dofs""" return self.__bendingFactor @bendingFactor.setter diff --git a/src/simapy/sima/riflex/doublesymmetriccrosssection.py b/src/simapy/sima/riflex/doublesymmetriccrosssection.py index 10c3e7cb..f2b74d5a 100644 --- a/src/simapy/sima/riflex/doublesymmetriccrosssection.py +++ b/src/simapy/sima/riflex/doublesymmetriccrosssection.py @@ -18,8 +18,8 @@ from .crsaxialdamping import CRSAxialDamping from .crsaxialfrictionmodel import CRSAxialFrictionModel from .crsmassdamping import CRSMassDamping -from .crsstiffnessdamping import CRSStiffnessDamping from .doublesymmetriccrosssectionmassvolume import DoubleSymmetricCrossSectionMassVolume +from .doublesymmetricstiffnessdamping import DoubleSymmetricStiffnessDamping from .hydrodynamicinputcode import HydrodynamicInputCode from .loadformulation import LoadFormulation from .torsionstiffness import TorsionStiffness @@ -97,7 +97,6 @@ class DoubleSymmetricCrossSection(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping cdax : float Quadratic aerodynamic drag force coefficient per unit length in tangential direction(default 0.0) @@ -159,6 +158,7 @@ class DoubleSymmetricCrossSection(CrossSection,CRSAxialFrictionModel): Shear stiffness in Y-direction(default 0.0) hydrodynamicRadiationInputCode : HydrodynamicInputCode Code for input of simplified radiation force coefficients + stiffnessDamping : DoubleSymmetricStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdx=0.0, cdy=0.0, cdz=0.0, amx=0.0, amy=0.0, amz=0.0, addedMass=0.0, cdlx=0.0, cdly=0.0, cdlz=0.0, cdt=0.0, cdn=0.0, cdnz=0.0, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, temperature=0.0, pressureDependency=0, axialStiffness=0.0, tensionCapacity=0.0, maxCurvatureY=0.0, maxCurvatureZ=0.0, chordLength=0.0, foilOriginY=0.0, foilOriginZ=0.0, foilInclination=0.0, aerodynamicForceType=AerodynamicForceType.NONE, coupledBendingTorsion=False, barBeam=BarBeam.BAR, axialStiffnessInput=AxialStiffness.CONSTANT, bendingStiffnessInput=BendingStiffness.CONSTANT, torsionStiffnessInput=TorsionStiffness.CONSTANT, negativeTorsionStiffness=0.0, positiveTorsionStiffness=0.0, bendingStiffnessY=0.0, bendingStiffnessZ=0.0, shearStiffnessZ=0.0, shearStiffnessY=0.0, hydrodynamicRadiationInputCode=HydrodynamicInputCode.DIMENSIONAL, **kwargs): @@ -197,7 +197,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.cdax = cdax self.cday = cday @@ -232,6 +231,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.shearStiffnessZ = shearStiffnessZ self.shearStiffnessY = shearStiffnessY self.hydrodynamicRadiationInputCode = hydrodynamicRadiationInputCode + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -585,16 +585,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -940,3 +930,13 @@ def hydrodynamicRadiationInputCode(self) -> HydrodynamicInputCode: def hydrodynamicRadiationInputCode(self, value: HydrodynamicInputCode): """Set hydrodynamicRadiationInputCode""" self.__hydrodynamicRadiationInputCode = value + + @property + def stiffnessDamping(self) -> DoubleSymmetricStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: DoubleSymmetricStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/doublesymmetricstiffnessdamping.py b/src/simapy/sima/riflex/doublesymmetricstiffnessdamping.py new file mode 100644 index 00000000..48a1946d --- /dev/null +++ b/src/simapy/sima/riflex/doublesymmetricstiffnessdamping.py @@ -0,0 +1,121 @@ +# This an autogenerated file +# +# Generated with DoubleSymmetricStiffnessDamping +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.doublesymmetricstiffnessdamping import DoubleSymmetricStiffnessDampingBlueprint +from typing import Dict +from ..sima import MOAO +from ..sima import ScriptableValue +from .rayleighdamping import RayleighDamping + +class DoubleSymmetricStiffnessDamping(MOAO): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + axialFactor : float + Factor for stiffness proportional damping in axial dof(default 0.0) + torsionalFactor : float + Factor for stiffness proportional damping in torsional dof(default 0.0) + bendingFactorY : float + Factor for stiffness proportional damping for bending around local Y-axis and shear in local Z-axis(default 0.0) + bendingFactorZ : float + Factor for stiffness proportional damping for bending around local Z-axis and shear in local Y-axis(default 0.0) + option : RayleighDamping + Stiffness proportional damping options + """ + + def __init__(self , description="", axialFactor=0.0, torsionalFactor=0.0, bendingFactorY=0.0, bendingFactorZ=0.0, option=RayleighDamping.TOTAL, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.axialFactor = axialFactor + self.torsionalFactor = torsionalFactor + self.bendingFactorY = bendingFactorY + self.bendingFactorZ = bendingFactorZ + self.option = option + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return DoubleSymmetricStiffnessDampingBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def axialFactor(self) -> float: + """Factor for stiffness proportional damping in axial dof""" + return self.__axialFactor + + @axialFactor.setter + def axialFactor(self, value: float): + """Set axialFactor""" + self.__axialFactor = float(value) + + @property + def torsionalFactor(self) -> float: + """Factor for stiffness proportional damping in torsional dof""" + return self.__torsionalFactor + + @torsionalFactor.setter + def torsionalFactor(self, value: float): + """Set torsionalFactor""" + self.__torsionalFactor = float(value) + + @property + def bendingFactorY(self) -> float: + """Factor for stiffness proportional damping for bending around local Y-axis and shear in local Z-axis""" + return self.__bendingFactorY + + @bendingFactorY.setter + def bendingFactorY(self, value: float): + """Set bendingFactorY""" + self.__bendingFactorY = float(value) + + @property + def bendingFactorZ(self) -> float: + """Factor for stiffness proportional damping for bending around local Z-axis and shear in local Y-axis""" + return self.__bendingFactorZ + + @bendingFactorZ.setter + def bendingFactorZ(self, value: float): + """Set bendingFactorZ""" + self.__bendingFactorZ = float(value) + + @property + def option(self) -> RayleighDamping: + """Stiffness proportional damping options""" + return self.__option + + @option.setter + def option(self, value: RayleighDamping): + """Set option""" + self.__option = value diff --git a/src/simapy/sima/riflex/fatigueproperties.py b/src/simapy/sima/riflex/fatigueproperties.py index 828fd094..9f9fb9bb 100644 --- a/src/simapy/sima/riflex/fatigueproperties.py +++ b/src/simapy/sima/riflex/fatigueproperties.py @@ -22,7 +22,7 @@ class FatigueProperties(MOAO): scriptableValues : List[ScriptableValue] calculationOption : FatigueCalculationOption numCrossSectionPoints : int - Number of points around cross-section where fatigue is(default 0) + Number of points around cross-section where fatigue is(default 8) resultPrintOption : ResultPrintOption timeSeriesPrintOption : TimeSeriesPrintOption Optional tension/curvature export to ascci file ( viv_tension_curvature_ts.txt ) @@ -54,7 +54,7 @@ class FatigueProperties(MOAO): (default False) """ - def __init__(self , description="", calculationOption=FatigueCalculationOption.DEFAULT, numCrossSectionPoints=0, resultPrintOption=ResultPrintOption.MOST_CRITICAL_POINT, timeSeriesPrintOption=TimeSeriesPrintOption.NO_PRINT, timeSeriesLength=0.0, timeStep=0.0, seed=31415, axialFactor=1.0, myFactor=1.0, mzFactor=1.0, crossSectionArea=0.0, sectionModulus=0.0, wallThickness=0.0, includeAllSNCurves=False, relativeDuration=0.0, scaledContributions=False, **kwargs): + def __init__(self , description="", calculationOption=FatigueCalculationOption.DEFAULT, numCrossSectionPoints=8, resultPrintOption=ResultPrintOption.MOST_CRITICAL_POINT, timeSeriesPrintOption=TimeSeriesPrintOption.NO_PRINT, timeSeriesLength=0.0, timeStep=0.0, seed=31415, axialFactor=1.0, myFactor=1.0, mzFactor=1.0, crossSectionArea=0.0, sectionModulus=0.0, wallThickness=0.0, includeAllSNCurves=False, relativeDuration=0.0, scaledContributions=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() diff --git a/src/simapy/sima/riflex/fibrerope.py b/src/simapy/sima/riflex/fibrerope.py index 057aad0b..c728b067 100644 --- a/src/simapy/sima/riflex/fibrerope.py +++ b/src/simapy/sima/riflex/fibrerope.py @@ -89,7 +89,6 @@ class FibreRope(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping temperature : float Temperature at which the specification applies(default 0.0) @@ -117,6 +116,7 @@ class FibreRope(CrossSection,CRSAxialFrictionModel): tmax : float (default 0.0) fibreRopeModel : FibreRopeModel + stiffnessDamping : CRSStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdt=0.0, cdn=0.0, cmt=0.0, cmn=0.0, cdtl=0.0, cdnl=0.0, cdx=0.0, cdy=0.0, amx=0.0, amy=0.0, cdlx=0.0, cdly=0.0, hydrodynamicRadiationInputCode=HydrodynamicInputCode.DIMENSIONAL, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, temperature=0.0, alpha=0.0, beta=0.0, defaultExpansion=True, tensionCapacity=0.0, maxCurvature=0.0, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, tmax=0.0, **kwargs): @@ -155,7 +155,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.temperature = temperature self.alpha = alpha @@ -171,6 +170,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.massVolume = None self.tmax = tmax self.fibreRopeModel = None + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -524,16 +524,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -683,3 +673,13 @@ def fibreRopeModel(self) -> FibreRopeModel: def fibreRopeModel(self, value: FibreRopeModel): """Set fibreRopeModel""" self.__fibreRopeModel = value + + @property + def stiffnessDamping(self) -> CRSStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: CRSStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/forceresponsestorage.py b/src/simapy/sima/riflex/forceresponsestorage.py index 42da84e1..cd1fbe28 100644 --- a/src/simapy/sima/riflex/forceresponsestorage.py +++ b/src/simapy/sima/riflex/forceresponsestorage.py @@ -33,12 +33,10 @@ class ForceResponseStorage(MOAO): Make transformation matrices available in the post processor(default False) relativeElementAngles : List[RelativeElementAngle] elementAngles : List[ElementAngle] - storeBottomContactForces : bool - Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements(default False) transformations : List[ElementTransformation] """ - def __init__(self , description="", storageStep=1, format=FileFormatCode.BINARY_OUTPUT_ONLY, matrixFormat=AdditionalFileFormatCode.BINARY_OUTPUT, readTransformationMatrices=False, storeBottomContactForces=False, **kwargs): + def __init__(self , description="", storageStep=1, format=FileFormatCode.BINARY_OUTPUT_ONLY, matrixFormat=AdditionalFileFormatCode.BINARY_OUTPUT, readTransformationMatrices=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -49,7 +47,6 @@ def __init__(self , description="", storageStep=1, format=FileFormatCode.BINARY_ self.readTransformationMatrices = readTransformationMatrices self.relativeElementAngles = list() self.elementAngles = list() - self.storeBottomContactForces = storeBottomContactForces self.transformations = list() for key, value in kwargs.items(): if not isinstance(value, Dict): @@ -160,16 +157,6 @@ def elementAngles(self, value: List[ElementAngle]): raise ValueError("Expected sequense, but was " , type(value)) self.__elementAngles = value - @property - def storeBottomContactForces(self) -> bool: - """Store results for seafloor contact elements and / or soil layer profile (SLP) contact elements""" - return self.__storeBottomContactForces - - @storeBottomContactForces.setter - def storeBottomContactForces(self, value: bool): - """Set storeBottomContactForces""" - self.__storeBottomContactForces = bool(value) - @property def transformations(self) -> List[ElementTransformation]: """""" diff --git a/src/simapy/sima/riflex/generalcrosssection.py b/src/simapy/sima/riflex/generalcrosssection.py index 93338593..d54b1304 100644 --- a/src/simapy/sima/riflex/generalcrosssection.py +++ b/src/simapy/sima/riflex/generalcrosssection.py @@ -13,7 +13,7 @@ from .crsaxialdamping import CRSAxialDamping from .crsaxialfrictionmodel import CRSAxialFrictionModel from .crsmassdamping import CRSMassDamping -from .crsstiffnessdamping import CRSStiffnessDamping +from .generalcrosssectionstiffnessdamping import GeneralCrossSectionStiffnessDamping from .hydrodynamicinputcode import HydrodynamicInputCode from .loadformulation import LoadFormulation from typing import TYPE_CHECKING @@ -89,7 +89,6 @@ class GeneralCrossSection(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping cdax : float Quadratic aerodynamic drag force coefficient per unit length in tangential direction(default 0.0) @@ -163,6 +162,7 @@ class GeneralCrossSection(CrossSection,CRSAxialFrictionModel): Shear stiffness in principal W-direction. Infinite shear stiffness if equal to zero(default 0.0) shearStiffnessV : float Shear stiffness in principal V-direction. Infinite shear stiffness if equal to zero(default 0.0) + stiffnessDamping : GeneralCrossSectionStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdx=0.0, cdy=0.0, cdz=0.0, amx=0.0, amy=0.0, amz=0.0, addedMass=0.0, cdlx=0.0, cdly=0.0, cdlz=0.0, cdt=0.0, cdn=0.0, cdnz=0.0, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, temperature=0.0, pressureDependency=0, axialStiffness=0.0, tensionCapacity=0.0, maxCurvatureY=0.0, maxCurvatureZ=0.0, chordLength=0.0, foilOriginY=0.0, foilOriginZ=0.0, foilInclination=0.0, aerodynamicForceType=AerodynamicForceType.NONE, coupledBendingTorsion=False, alpha=0.0, massCenterY=0.0, massCenterZ=0.0, buoyancyCenterY=0.0, buoyancyCenterZ=0.0, areaCenterY=0.0, areaCenterZ=0.0, principalAxesOrientation=0.0, shearCenterY=0.0, shearCenterZ=0.0, massCoefficient=0.0, extCrossSectionalArea=0.0, intCrossSectionalArea=0.0, gyrationRadius=0.0, torsionStiffness=0.0, bendingStiffnessV=0.0, bendingStiffnessW=0.0, shearStiffnessW=0.0, shearStiffnessV=0.0, **kwargs): @@ -201,7 +201,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.cdax = cdax self.cday = cday @@ -240,6 +239,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.bendingStiffnessW = bendingStiffnessW self.shearStiffnessW = shearStiffnessW self.shearStiffnessV = shearStiffnessV + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -593,16 +593,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -982,3 +972,13 @@ def shearStiffnessV(self) -> float: def shearStiffnessV(self, value: float): """Set shearStiffnessV""" self.__shearStiffnessV = float(value) + + @property + def stiffnessDamping(self) -> GeneralCrossSectionStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: GeneralCrossSectionStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/generalcrosssectionstiffnessdamping.py b/src/simapy/sima/riflex/generalcrosssectionstiffnessdamping.py new file mode 100644 index 00000000..00769fad --- /dev/null +++ b/src/simapy/sima/riflex/generalcrosssectionstiffnessdamping.py @@ -0,0 +1,107 @@ +# This an autogenerated file +# +# Generated with GeneralCrossSectionStiffnessDamping +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.generalcrosssectionstiffnessdamping import GeneralCrossSectionStiffnessDampingBlueprint +from typing import Dict +from ..sima import MOAO +from ..sima import ScriptableValue + +class GeneralCrossSectionStiffnessDamping(MOAO): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + axialFactor : float + Factor for stiffness proportional damping in axial dof(default 0.0) + torsionalFactor : float + Factor for stiffness proportional damping in torsional dof(default 0.0) + bendingFactorV : float + Factor for stiffness proportional damping for bending around principal V-axis and shear in principal W-axis(default 0.0) + bendingFactorW : float + Factor for stiffness proportional damping for bending around principal W-axis and shear in principal V-axis(default 0.0) + """ + + def __init__(self , description="", axialFactor=0.0, torsionalFactor=0.0, bendingFactorV=0.0, bendingFactorW=0.0, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.axialFactor = axialFactor + self.torsionalFactor = torsionalFactor + self.bendingFactorV = bendingFactorV + self.bendingFactorW = bendingFactorW + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return GeneralCrossSectionStiffnessDampingBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def axialFactor(self) -> float: + """Factor for stiffness proportional damping in axial dof""" + return self.__axialFactor + + @axialFactor.setter + def axialFactor(self, value: float): + """Set axialFactor""" + self.__axialFactor = float(value) + + @property + def torsionalFactor(self) -> float: + """Factor for stiffness proportional damping in torsional dof""" + return self.__torsionalFactor + + @torsionalFactor.setter + def torsionalFactor(self, value: float): + """Set torsionalFactor""" + self.__torsionalFactor = float(value) + + @property + def bendingFactorV(self) -> float: + """Factor for stiffness proportional damping for bending around principal V-axis and shear in principal W-axis""" + return self.__bendingFactorV + + @bendingFactorV.setter + def bendingFactorV(self, value: float): + """Set bendingFactorV""" + self.__bendingFactorV = float(value) + + @property + def bendingFactorW(self) -> float: + """Factor for stiffness proportional damping for bending around principal W-axis and shear in principal V-axis""" + return self.__bendingFactorW + + @bendingFactorW.setter + def bendingFactorW(self, value: float): + """Set bendingFactorW""" + self.__bendingFactorW = float(value) diff --git a/src/simapy/sima/riflex/geotechnicalspring.py b/src/simapy/sima/riflex/geotechnicalspring.py index 5a8226c5..708bc068 100644 --- a/src/simapy/sima/riflex/geotechnicalspring.py +++ b/src/simapy/sima/riflex/geotechnicalspring.py @@ -36,13 +36,11 @@ class GeotechnicalSpring(NodeReference,NamedObject): (default None) stiffnessItems : List[GeotechnicalSpringStiffnessItem] dampingDisplacementItems : List[DampingDisplacementItem] - strainVelocityExponent : float - (default 1.0) - relativeLength : float - Relative length for result scaling(default 1.0) + velocityExponent : float + Exponent of velocity in damping calculation(default 1.0) """ - def __init__(self , description="", segment=1, allSegments=False, nodeNumber=1, allNodes=False, strainVelocityExponent=1.0, relativeLength=1.0, **kwargs): + def __init__(self , description="", segment=1, allSegments=False, nodeNumber=1, allNodes=False, velocityExponent=1.0, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -54,8 +52,7 @@ def __init__(self , description="", segment=1, allSegments=False, nodeNumber=1, self.name = None self.stiffnessItems = list() self.dampingDisplacementItems = list() - self.strainVelocityExponent = strainVelocityExponent - self.relativeLength = relativeLength + self.velocityExponent = velocityExponent for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -174,21 +171,11 @@ def dampingDisplacementItems(self, value: List[DampingDisplacementItem]): self.__dampingDisplacementItems = value @property - def strainVelocityExponent(self) -> float: - """""" - return self.__strainVelocityExponent - - @strainVelocityExponent.setter - def strainVelocityExponent(self, value: float): - """Set strainVelocityExponent""" - self.__strainVelocityExponent = float(value) - - @property - def relativeLength(self) -> float: - """Relative length for result scaling""" - return self.__relativeLength - - @relativeLength.setter - def relativeLength(self, value: float): - """Set relativeLength""" - self.__relativeLength = float(value) + def velocityExponent(self) -> float: + """Exponent of velocity in damping calculation""" + return self.__velocityExponent + + @velocityExponent.setter + def velocityExponent(self, value: float): + """Set velocityExponent""" + self.__velocityExponent = float(value) diff --git a/src/simapy/sima/riflex/globalspringstiffnessitem.py b/src/simapy/sima/riflex/globalspringstiffnessitem.py index 532bcdad..2826a65d 100644 --- a/src/simapy/sima/riflex/globalspringstiffnessitem.py +++ b/src/simapy/sima/riflex/globalspringstiffnessitem.py @@ -16,9 +16,9 @@ class GlobalSpringStiffnessItem(MOAO): (default "") scriptableValues : List[ScriptableValue] force : float - Spring force / moment corresponding to.(default 0.0) + (default 0.0) displacement : float - Spring displacement.(default 0.0) + (default 0.0) """ def __init__(self , description="", force=0.0, displacement=0.0, **kwargs): @@ -62,7 +62,7 @@ def scriptableValues(self, value: List[ScriptableValue]): @property def force(self) -> float: - """Spring force / moment corresponding to.""" + """""" return self.__force @force.setter @@ -72,7 +72,7 @@ def force(self, value: float): @property def displacement(self) -> float: - """Spring displacement.""" + """""" return self.__displacement @displacement.setter diff --git a/src/simapy/sima/riflex/horizontalaxiscontroller.py b/src/simapy/sima/riflex/horizontalaxiscontroller.py index 43e35b09..490b1998 100644 --- a/src/simapy/sima/riflex/horizontalaxiscontroller.py +++ b/src/simapy/sima/riflex/horizontalaxiscontroller.py @@ -33,6 +33,8 @@ class HorizontalAxisController(HorizontalAxisWindTurbineController): Rated electrical torque(default 0.0) gearBoxRatio : float Gear box ratio(default 0.0) + generatorEfficiency : float + Generator efficiency due to electrical and mechanical losses(default 1.0) maxPitchRate : float Maximum pitch rate(default 0.0) maxPitch : float @@ -77,7 +79,7 @@ class HorizontalAxisController(HorizontalAxisWindTurbineController): towerTop : ElementEndSpesification """ - def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega=0.0, ratedTorque=0.0, gearBoxRatio=0.0, maxPitchRate=0.0, maxPitch=0.0, maxTorqueRate=0.0, maxTorque=0.0, gainScheduling=TableFormat.DEFAULT, external=False, reg3MinPitch=0.0, transitionalSpeed15=0.0, transitionalSpeed20=0.0, transitionalSpeed25=0.0, transitionalSpeed30=0.0, reg2Torque=0.0, powerExtraction=PowerExtraction.POWER, minPitch=0.0, sampleInterval=0.0, controllerType=ControllerType.JAR_FILE_CONTROLLER, logFile=False, specifyTowerTop=False, **kwargs): + def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega=0.0, ratedTorque=0.0, gearBoxRatio=0.0, generatorEfficiency=1.0, maxPitchRate=0.0, maxPitch=0.0, maxTorqueRate=0.0, maxTorque=0.0, gainScheduling=TableFormat.DEFAULT, external=False, reg3MinPitch=0.0, transitionalSpeed15=0.0, transitionalSpeed20=0.0, transitionalSpeed25=0.0, transitionalSpeed30=0.0, reg2Torque=0.0, powerExtraction=PowerExtraction.POWER, minPitch=0.0, sampleInterval=0.0, controllerType=ControllerType.JAR_FILE_CONTROLLER, logFile=False, specifyTowerTop=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -87,6 +89,7 @@ def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega self.ratedOmega = ratedOmega self.ratedTorque = ratedTorque self.gearBoxRatio = gearBoxRatio + self.generatorEfficiency = generatorEfficiency self.maxPitchRate = maxPitchRate self.maxPitch = maxPitch self.maxTorqueRate = maxTorqueRate @@ -204,6 +207,16 @@ def gearBoxRatio(self, value: float): """Set gearBoxRatio""" self.__gearBoxRatio = float(value) + @property + def generatorEfficiency(self) -> float: + """Generator efficiency due to electrical and mechanical losses""" + return self.__generatorEfficiency + + @generatorEfficiency.setter + def generatorEfficiency(self, value: float): + """Set generatorEfficiency""" + self.__generatorEfficiency = float(value) + @property def maxPitchRate(self) -> float: """Maximum pitch rate""" diff --git a/src/simapy/sima/riflex/riflexdynamiccalculationparameters.py b/src/simapy/sima/riflex/riflexdynamiccalculationparameters.py index 23bc764a..853db888 100644 --- a/src/simapy/sima/riflex/riflexdynamiccalculationparameters.py +++ b/src/simapy/sima/riflex/riflexdynamiccalculationparameters.py @@ -9,6 +9,7 @@ from ..sima import ScriptableValue from .bladepitchfault import BladePitchFault from .bodyforcestorage import BodyForceStorage +from .bottomcontactstorage import BottomContactStorage from .boundarychangegroup import BoundaryChangeGroup from .curvatureresponsestorage import CurvatureResponseStorage from .displacementresponsestorage import DisplacementResponseStorage @@ -81,6 +82,7 @@ class RIFLEXDynamicCalculationParameters(MOAO): changeStaticLoads : bool Change applied static loads at the start of the dynamic analysis(default False) dynamicLoads : DynamicLoads + bottomContactStorage : BottomContactStorage """ def __init__(self , description="", volumeForcesScaling=1.0, specifiedForcesScaling=1.0, currentVelocitiesScaling=1.0, changeStaticLoads=False, **kwargs): @@ -120,6 +122,7 @@ def __init__(self , description="", volumeForcesScaling=1.0, specifiedForcesScal self.currentVelocitiesScaling = currentVelocitiesScaling self.changeStaticLoads = changeStaticLoads self.dynamicLoads = None + self.bottomContactStorage = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -498,3 +501,13 @@ def dynamicLoads(self) -> DynamicLoads: def dynamicLoads(self, value: DynamicLoads): """Set dynamicLoads""" self.__dynamicLoads = value + + @property + def bottomContactStorage(self) -> BottomContactStorage: + """""" + return self.__bottomContactStorage + + @bottomContactStorage.setter + def bottomContactStorage(self, value: BottomContactStorage): + """Set bottomContactStorage""" + self.__bottomContactStorage = value diff --git a/src/simapy/sima/riflex/riflextask.py b/src/simapy/sima/riflex/riflextask.py index 802fc672..79b53cfe 100644 --- a/src/simapy/sima/riflex/riflextask.py +++ b/src/simapy/sima/riflex/riflextask.py @@ -44,8 +44,6 @@ class RIFLEXTask(SIMOTask): (default True) exportMassUnit : MassUnit Used as export unit for mass ( and indirectly force) - exportAsFMU : bool - Generate FMU (Functional Mockup Unit) from model(default False) riflexStamodMemory : int Enables override of the default memory settings. Given in MB(default 512) numRiflexStamodArrays : int @@ -62,7 +60,7 @@ class RIFLEXTask(SIMOTask): (default True) """ - def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermediateFiles=True, exportMassUnit=MassUnit.MG, exportAsFMU=False, riflexStamodMemory=512, numRiflexStamodArrays=20000, riflexDynmodMemory=512, vivanaWorkArraySize=9000000, maxRiflexArrays=2000, riflexOutmodMemory=32, skipRiflexDynmodTransformation=True, **kwargs): + def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermediateFiles=True, exportMassUnit=MassUnit.MG, riflexStamodMemory=512, numRiflexStamodArrays=20000, riflexDynmodMemory=512, vivanaWorkArraySize=9000000, maxRiflexArrays=2000, riflexOutmodMemory=32, skipRiflexDynmodTransformation=True, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -80,7 +78,6 @@ def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermedi self.simoMemory = simoMemory self.removeIntermediateFiles = removeIntermediateFiles self.exportMassUnit = exportMassUnit - self.exportAsFMU = exportAsFMU self.riflexStamodMemory = riflexStamodMemory self.numRiflexStamodArrays = numRiflexStamodArrays self.riflexDynmodMemory = riflexDynmodMemory @@ -275,16 +272,6 @@ def exportMassUnit(self, value: MassUnit): """Set exportMassUnit""" self.__exportMassUnit = value - @property - def exportAsFMU(self) -> bool: - """Generate FMU (Functional Mockup Unit) from model""" - return self.__exportAsFMU - - @exportAsFMU.setter - def exportAsFMU(self, value: bool): - """Set exportAsFMU""" - self.__exportAsFMU = bool(value) - @property def riflexStamodMemory(self) -> int: """Enables override of the default memory settings. Given in MB""" diff --git a/src/simapy/sima/riflex/staticloadtypeitem.py b/src/simapy/sima/riflex/staticloadtypeitem.py index dea1ab9a..0f044f9f 100644 --- a/src/simapy/sima/riflex/staticloadtypeitem.py +++ b/src/simapy/sima/riflex/staticloadtypeitem.py @@ -23,7 +23,6 @@ class StaticLoadTypeItem(MOAO): scriptableValues : List[ScriptableValue] runWithPrevious : bool Run the load group together with the last(default False) - boundaryChangeGroup : BoundaryChangeGroup loadType : StaticLoadType Load Type nStep : int @@ -37,6 +36,7 @@ class StaticLoadTypeItem(MOAO): Required accuracy measured by energy norm. Value is not used if convergence norm is 'Displacement'.(default 1e-05) entered : bool start condition for pipe-in-pipe contact(default True) + boundaryChangeGroup : BoundaryChangeGroup temperatureVariations : List[TemperatureVariationItem] pressureVariations : List[PressureVariationItem] winchVariations : List[WinchVariationItem] @@ -51,7 +51,6 @@ def __init__(self , description="", runWithPrevious=False, loadType=StaticLoadTy self.description = description self.scriptableValues = list() self.runWithPrevious = runWithPrevious - self.boundaryChangeGroup = None self.loadType = loadType self.nStep = nStep self.maxIterations = maxIterations @@ -59,6 +58,7 @@ def __init__(self , description="", runWithPrevious=False, loadType=StaticLoadTy self.convergenceNorm = convergenceNorm self.energyAccuracy = energyAccuracy self.entered = entered + self.boundaryChangeGroup = None self.temperatureVariations = list() self.pressureVariations = list() self.winchVariations = list() @@ -107,16 +107,6 @@ def runWithPrevious(self, value: bool): """Set runWithPrevious""" self.__runWithPrevious = bool(value) - @property - def boundaryChangeGroup(self) -> BoundaryChangeGroup: - """""" - return self.__boundaryChangeGroup - - @boundaryChangeGroup.setter - def boundaryChangeGroup(self, value: BoundaryChangeGroup): - """Set boundaryChangeGroup""" - self.__boundaryChangeGroup = value - @property def loadType(self) -> StaticLoadType: """Load Type""" @@ -187,6 +177,16 @@ def entered(self, value: bool): """Set entered""" self.__entered = bool(value) + @property + def boundaryChangeGroup(self) -> BoundaryChangeGroup: + """""" + return self.__boundaryChangeGroup + + @boundaryChangeGroup.setter + def boundaryChangeGroup(self, value: BoundaryChangeGroup): + """Set boundaryChangeGroup""" + self.__boundaryChangeGroup = value + @property def temperatureVariations(self) -> List[TemperatureVariationItem]: """""" diff --git a/src/simapy/sima/riflex/steelgrade.py b/src/simapy/sima/riflex/steelgrade.py new file mode 100644 index 00000000..ff0433c2 --- /dev/null +++ b/src/simapy/sima/riflex/steelgrade.py @@ -0,0 +1,24 @@ +# Generated with SteelGrade +# +from enum import Enum +from enum import auto + +class SteelGrade(Enum): + """""" + R3 = auto() + R3S = auto() + R4 = auto() + R4S = auto() + R5 = auto() + + def label(self): + if self == SteelGrade.R3: + return "R3" + if self == SteelGrade.R3S: + return "R3S" + if self == SteelGrade.R4: + return "R4" + if self == SteelGrade.R4S: + return "R4S" + if self == SteelGrade.R5: + return "R5" \ No newline at end of file diff --git a/src/simapy/sima/riflex/thinwalledpipe.py b/src/simapy/sima/riflex/thinwalledpipe.py index 3bd82f1b..88bea727 100644 --- a/src/simapy/sima/riflex/thinwalledpipe.py +++ b/src/simapy/sima/riflex/thinwalledpipe.py @@ -87,7 +87,6 @@ class ThinWalledPipe(CrossSection,CRSAxialFrictionModel): axialDampingSpecification : bool Local axial damping model(default False) massDamping : CRSMassDamping - stiffnessDamping : CRSStiffnessDamping axialDamping : CRSAxialDamping temperature : float Temperature at which the specification applies(default 0.0) @@ -133,6 +132,7 @@ class ThinWalledPipe(CrossSection,CRSAxialFrictionModel): Inner or outer diameter coupledBendingTorsion : bool Geometric stiffness coupling between bending and torsion(default False) + stiffnessDamping : CRSStiffnessDamping """ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dynamicFriction=0.0, dynamicElongation=0.0, axialFriction=False, scfkSpecification=False, loadFormulation=LoadFormulation.MORISON, hydrodynamicDiameter=0.0, hydrodynamicInputCode=HydrodynamicInputCode.DIMENSIONAL, addedMassTanDir=0.0, addedMassNormDir=0.0, dampingNormDir=0.0, normalDirectionScaling=1.0, tangentialDirectionScaling=1.0, cdt=0.0, cdn=0.0, cmt=0.0, cmn=0.0, cdtl=0.0, cdnl=0.0, cdx=0.0, cdy=0.0, amx=0.0, amy=0.0, cdlx=0.0, cdly=0.0, hydrodynamicRadiationInputCode=HydrodynamicInputCode.DIMENSIONAL, massDampingSpecification=False, stiffnessDampingSpecification=False, axialDampingSpecification=False, temperature=0.0, alpha=0.0, beta=0.0, defaultExpansion=True, tensionCapacity=0.0, maxCurvature=0.0, cdax=0.0, cday=0.0, cdaz=0.0, aerodynamicInputCode=AerodynamicInputCode.NONE, aerodynamicDiameter=0.0, pipeDiameter=0.0, pipeThickness=0.0, materialDensity=0.0, extCoatingThickness=0.0, extCoatingDensity=0.0, extContactRadius=0.0, intContactRadius=0.0, calculateBeta=False, diameterType=InnerOuter.OUTER, coupledBendingTorsion=False, **kwargs): @@ -171,7 +171,6 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.stiffnessDampingSpecification = stiffnessDampingSpecification self.axialDampingSpecification = axialDampingSpecification self.massDamping = None - self.stiffnessDamping = None self.axialDamping = None self.temperature = temperature self.alpha = alpha @@ -196,6 +195,7 @@ def __init__(self , description="", staticFriction=0.0, staticElongation=0.0, dy self.calculateBeta = calculateBeta self.diameterType = diameterType self.coupledBendingTorsion = coupledBendingTorsion + self.stiffnessDamping = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -549,16 +549,6 @@ def massDamping(self, value: CRSMassDamping): """Set massDamping""" self.__massDamping = value - @property - def stiffnessDamping(self) -> CRSStiffnessDamping: - """""" - return self.__stiffnessDamping - - @stiffnessDamping.setter - def stiffnessDamping(self, value: CRSStiffnessDamping): - """Set stiffnessDamping""" - self.__stiffnessDamping = value - @property def axialDamping(self) -> CRSAxialDamping: """""" @@ -798,3 +788,13 @@ def coupledBendingTorsion(self) -> bool: def coupledBendingTorsion(self, value: bool): """Set coupledBendingTorsion""" self.__coupledBendingTorsion = bool(value) + + @property + def stiffnessDamping(self) -> CRSStiffnessDamping: + """""" + return self.__stiffnessDamping + + @stiffnessDamping.setter + def stiffnessDamping(self, value: CRSStiffnessDamping): + """Set stiffnessDamping""" + self.__stiffnessDamping = value diff --git a/src/simapy/sima/riflex/touchdownpointstorage.py b/src/simapy/sima/riflex/touchdownpointstorage.py new file mode 100644 index 00000000..c7edacb9 --- /dev/null +++ b/src/simapy/sima/riflex/touchdownpointstorage.py @@ -0,0 +1,85 @@ +# This an autogenerated file +# +# Generated with TouchDownPointStorage +from __future__ import annotations +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.touchdownpointstorage import TouchDownPointStorageBlueprint +from typing import Dict +from ..sima import ScriptableValue +from .linereference import LineReference +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from .arline import ARLine + +class TouchDownPointStorage(LineReference): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + line : ARLine + Line + numberOfElements : int + Additional bottom contact forces for a selected number of elements next to the TDP element(default 0) + """ + + def __init__(self , description="", numberOfElements=0, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.line = None + self.numberOfElements = numberOfElements + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return TouchDownPointStorageBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def line(self) -> ARLine: + """Line""" + return self.__line + + @line.setter + def line(self, value: ARLine): + """Set line""" + self.__line = value + + @property + def numberOfElements(self) -> int: + """Additional bottom contact forces for a selected number of elements next to the TDP element""" + return self.__numberOfElements + + @numberOfElements.setter + def numberOfElements(self, value: int): + """Set numberOfElements""" + self.__numberOfElements = int(value) diff --git a/src/simapy/sima/riflex/windturbine.py b/src/simapy/sima/riflex/windturbine.py index 3cb4a381..c4fbce9d 100644 --- a/src/simapy/sima/riflex/windturbine.py +++ b/src/simapy/sima/riflex/windturbine.py @@ -55,12 +55,16 @@ class WindTurbine(NamedObject): The correction for hub loss due to the finite number of blades may be applied or removed.(default False) prandtlYaw : bool If yaw correction is selected, the Prandtl factor is modified based on the angle between the incoming wind and the rotor plane.(default True) + skewedWake : bool + If skewed wake factor is selected, user can define yaw correction in BEM(default False) + skewedWakeFactor : float + Skewed wake factor(default 1.0) measurementNodes : List[MeasurementNode] measurementElements : List[MeasurementElement] yawController : HorizontalAxisYawController """ - def __init__(self , description="", windLoadOption=WindTurbineLoadOption.INCLUDE, turbineOrientation=TurbineOrientation.UPWIND, bakFactor=0.1, dragEffect=False, advancedOptions=False, inductionCalculation=True, prandtlTip=True, prandtlRoot=False, prandtlYaw=True, **kwargs): + def __init__(self , description="", windLoadOption=WindTurbineLoadOption.INCLUDE, turbineOrientation=TurbineOrientation.UPWIND, bakFactor=0.1, dragEffect=False, advancedOptions=False, inductionCalculation=True, prandtlTip=True, prandtlRoot=False, prandtlYaw=True, skewedWake=False, skewedWakeFactor=1.0, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -79,6 +83,8 @@ def __init__(self , description="", windLoadOption=WindTurbineLoadOption.INCLUDE self.prandtlTip = prandtlTip self.prandtlRoot = prandtlRoot self.prandtlYaw = prandtlYaw + self.skewedWake = skewedWake + self.skewedWakeFactor = skewedWakeFactor self.measurementNodes = list() self.measurementElements = list() self.yawController = None @@ -268,6 +274,26 @@ def prandtlYaw(self, value: bool): """Set prandtlYaw""" self.__prandtlYaw = bool(value) + @property + def skewedWake(self) -> bool: + """If skewed wake factor is selected, user can define yaw correction in BEM""" + return self.__skewedWake + + @skewedWake.setter + def skewedWake(self, value: bool): + """Set skewedWake""" + self.__skewedWake = bool(value) + + @property + def skewedWakeFactor(self) -> float: + """Skewed wake factor""" + return self.__skewedWakeFactor + + @skewedWakeFactor.setter + def skewedWakeFactor(self, value: float): + """Set skewedWakeFactor""" + self.__skewedWakeFactor = float(value) + @property def measurementNodes(self) -> List[MeasurementNode]: """""" diff --git a/src/simapy/sima/signals/report/appendix.py b/src/simapy/sima/signals/report/appendix.py index c43a54b5..ae57c1aa 100644 --- a/src/simapy/sima/signals/report/appendix.py +++ b/src/simapy/sima/signals/report/appendix.py @@ -19,14 +19,17 @@ class Appendix(Section): (default None) landscape : bool (default False) + pageBreakBefore : bool + (default False) """ - def __init__(self , description="", landscape=False, **kwargs): + def __init__(self , description="", landscape=False, pageBreakBefore=False, **kwargs): super().__init__(**kwargs) self.description = description self.items = list() self.title = None self.landscape = landscape + self.pageBreakBefore = pageBreakBefore for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -79,3 +82,13 @@ def landscape(self) -> bool: def landscape(self, value: bool): """Set landscape""" self.__landscape = bool(value) + + @property + def pageBreakBefore(self) -> bool: + """""" + return self.__pageBreakBefore + + @pageBreakBefore.setter + def pageBreakBefore(self, value: bool): + """Set pageBreakBefore""" + self.__pageBreakBefore = bool(value) diff --git a/src/simapy/sima/signals/report/blueprints/appendix.py b/src/simapy/sima/signals/report/blueprints/appendix.py index 6e778609..3d677106 100644 --- a/src/simapy/sima/signals/report/blueprints/appendix.py +++ b/src/simapy/sima/signals/report/blueprints/appendix.py @@ -15,4 +15,5 @@ def __init__(self, name="Appendix", package_path="sima/signals/report", descript self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("items","sima/signals/report/ReportItem","",True,Dimension("*"))) self.add_attribute(Attribute("title","string","",optional=False)) - self.add_attribute(Attribute("landscape","boolean","",default=False)) \ No newline at end of file + self.add_attribute(Attribute("landscape","boolean","",default=False)) + self.add_attribute(Attribute("pageBreakBefore","boolean","",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/signals/report/blueprints/font.py b/src/simapy/sima/signals/report/blueprints/font.py index 597c3ebc..7c930a51 100644 --- a/src/simapy/sima/signals/report/blueprints/font.py +++ b/src/simapy/sima/signals/report/blueprints/font.py @@ -15,4 +15,5 @@ def __init__(self, name="Font", package_path="sima/signals/report", description= self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(Attribute("size","integer","",default=10)) self.add_attribute(Attribute("font","string","")) + self.add_attribute(Attribute("color","string","")) self.add_attribute(EnumAttribute("style","sima/signals/report/FontStyle","")) \ No newline at end of file diff --git a/src/simapy/sima/signals/report/blueprints/lineplot.py b/src/simapy/sima/signals/report/blueprints/lineplot.py index 66397603..278f0004 100644 --- a/src/simapy/sima/signals/report/blueprints/lineplot.py +++ b/src/simapy/sima/signals/report/blueprints/lineplot.py @@ -5,9 +5,9 @@ from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from dmt.blueprints.entity import EntityBlueprint +from .reportitem import ReportItemBlueprint -class LinePlotBlueprint(EntityBlueprint): +class LinePlotBlueprint(ReportItemBlueprint): """""" def __init__(self, name="LinePlot", package_path="sima/signals/report", description=""): diff --git a/src/simapy/sima/signals/report/blueprints/plotline.py b/src/simapy/sima/signals/report/blueprints/plotline.py index efdf11ab..5437f102 100644 --- a/src/simapy/sima/signals/report/blueprints/plotline.py +++ b/src/simapy/sima/signals/report/blueprints/plotline.py @@ -15,6 +15,7 @@ def __init__(self, name="PlotLine", package_path="sima/signals/report", descript self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(Attribute("xlabel","string","")) self.add_attribute(Attribute("ylabel","string","")) + self.add_attribute(Attribute("legend","string","")) self.add_attribute(Attribute("showlegend","boolean","",default=True)) self.add_attribute(Attribute("x","number","",Dimension("*"),default=0.0)) self.add_attribute(Attribute("y","number","",Dimension("*"),default=0.0)) diff --git a/src/simapy/sima/signals/report/blueprints/report.py b/src/simapy/sima/signals/report/blueprints/report.py index 51a35ed1..209d7466 100644 --- a/src/simapy/sima/signals/report/blueprints/report.py +++ b/src/simapy/sima/signals/report/blueprints/report.py @@ -14,5 +14,5 @@ def __init__(self, name="Report", package_path="sima/signals/report", descriptio super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("items","sima/signals/report/ReportItem","",True,Dimension("*"))) - self.add_attribute(Attribute("title","string","",optional=False)) + self.add_attribute(Attribute("title","string","")) self.add_attribute(Attribute("subtitle","string","")) \ No newline at end of file diff --git a/src/simapy/sima/signals/report/blueprints/section.py b/src/simapy/sima/signals/report/blueprints/section.py index 95119c0c..26e3736e 100644 --- a/src/simapy/sima/signals/report/blueprints/section.py +++ b/src/simapy/sima/signals/report/blueprints/section.py @@ -16,4 +16,5 @@ def __init__(self, name="Section", package_path="sima/signals/report", descripti self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("items","sima/signals/report/ReportItem","",True,Dimension("*"))) self.add_attribute(Attribute("title","string","",optional=False)) - self.add_attribute(Attribute("landscape","boolean","",default=False)) \ No newline at end of file + self.add_attribute(Attribute("landscape","boolean","",default=False)) + self.add_attribute(Attribute("pageBreakBefore","boolean","",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/signals/report/font.py b/src/simapy/sima/signals/report/font.py index a91a12ec..658c60af 100644 --- a/src/simapy/sima/signals/report/font.py +++ b/src/simapy/sima/signals/report/font.py @@ -18,6 +18,8 @@ class Font(Entity): (default 10) font : str (default None) + color : str + (default None) style : FontStyle """ @@ -26,6 +28,7 @@ def __init__(self , description="", size=10, style=FontStyle.NORMAL, **kwargs): self.description = description self.size = size self.font = None + self.color = None self.style = style for key, value in kwargs.items(): if not isinstance(value, Dict): @@ -68,6 +71,16 @@ def font(self, value: str): """Set font""" self.__font = value + @property + def color(self) -> str: + """""" + return self.__color + + @color.setter + def color(self, value: str): + """Set color""" + self.__color = value + @property def style(self) -> FontStyle: """""" diff --git a/src/simapy/sima/signals/report/lineplot.py b/src/simapy/sima/signals/report/lineplot.py index 6372f9af..9d2dcf95 100644 --- a/src/simapy/sima/signals/report/lineplot.py +++ b/src/simapy/sima/signals/report/lineplot.py @@ -9,9 +9,9 @@ from .font import Font from .plotline import PlotLine from .plotsize import PlotSize -from dmt.entity import Entity +from .reportitem import ReportItem -class LinePlot(Entity): +class LinePlot(ReportItem): """ Keyword arguments ----------------- diff --git a/src/simapy/sima/signals/report/plotline.py b/src/simapy/sima/signals/report/plotline.py index 208c3ab6..19cd5161 100644 --- a/src/simapy/sima/signals/report/plotline.py +++ b/src/simapy/sima/signals/report/plotline.py @@ -19,6 +19,8 @@ class PlotLine(Entity): (default None) ylabel : str (default None) + legend : str + (default None) showlegend : bool (default True) x : ndarray of float @@ -38,6 +40,7 @@ def __init__(self , description="", showlegend=True, linewidth=1, pointsize=1, l self.description = description self.xlabel = None self.ylabel = None + self.legend = None self.showlegend = showlegend self.x = [] self.y = [] @@ -87,6 +90,16 @@ def ylabel(self, value: str): """Set ylabel""" self.__ylabel = value + @property + def legend(self) -> str: + """""" + return self.__legend + + @legend.setter + def legend(self, value: str): + """Set legend""" + self.__legend = value + @property def showlegend(self) -> bool: """""" diff --git a/src/simapy/sima/signals/report/section.py b/src/simapy/sima/signals/report/section.py index 4d265819..d593f5e3 100644 --- a/src/simapy/sima/signals/report/section.py +++ b/src/simapy/sima/signals/report/section.py @@ -19,14 +19,17 @@ class Section(ReportItemContainer,ReportItem): (default None) landscape : bool (default False) + pageBreakBefore : bool + (default False) """ - def __init__(self , description="", landscape=False, **kwargs): + def __init__(self , description="", landscape=False, pageBreakBefore=False, **kwargs): super().__init__(**kwargs) self.description = description self.items = list() self.title = None self.landscape = landscape + self.pageBreakBefore = pageBreakBefore for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -79,3 +82,13 @@ def landscape(self) -> bool: def landscape(self, value: bool): """Set landscape""" self.__landscape = bool(value) + + @property + def pageBreakBefore(self) -> bool: + """""" + return self.__pageBreakBefore + + @pageBreakBefore.setter + def pageBreakBefore(self, value: bool): + """Set pageBreakBefore""" + self.__pageBreakBefore = bool(value) diff --git a/src/simapy/sima/sima/__init__.py b/src/simapy/sima/sima/__init__.py index 1d6b9c66..9e4c93e0 100644 --- a/src/simapy/sima/sima/__init__.py +++ b/src/simapy/sima/sima/__init__.py @@ -6,6 +6,7 @@ from .condition import Condition # noqa from .conditionresultcontainer import ConditionResultContainer # noqa from .conditionselectable import ConditionSelectable # noqa +from .csvresult import CSVResult # noqa from .doublevariable import DoubleVariable # noqa from .fileresource import FileResource # noqa from .filestorage import FileStorage # noqa @@ -16,19 +17,20 @@ from .infrastructurebody import InfrastructureBody # noqa from .initialviewpoint import InitialViewpoint # noqa from .integervariable import IntegerVariable # noqa +from .intvalue import IntValue # noqa from .jobpreference import JobPreference # noqa from .librarypathitem import LibraryPathItem # noqa from .librarypaths import LibraryPaths # noqa from .licensepreference import LicensePreference # noqa from .location import Location # noqa from .moao import MOAO # noqa -from .moaofolder import MOAOFolder # noqa from .modelreference import ModelReference # noqa from .modelreferencevariable import ModelReferenceVariable # noqa from .named import Named # noqa from .namedobject import NamedObject # noqa from .namedstorageresource import NamedStorageResource # noqa from .namedviewpoint import NamedViewpoint # noqa +from .numbervalue import NumberValue # noqa from .point3 import Point3 # noqa from .position import Position # noqa from .property import Property # noqa @@ -47,11 +49,15 @@ from .simascripttrigger import SIMAScriptTrigger # noqa from .simaworkspace import SIMAWorkspace # noqa from .singleparameter import SingleParameter # noqa +from .singlevalue import SingleValue # noqa from .storagetask import StorageTask # noqa +from .stringvalue import StringValue # noqa from .stringvariable import StringVariable # noqa from .task import Task # noqa from .taskfolder import TaskFolder # noqa from .unitpreference import UnitPreference # noqa +from .value import Value # noqa +from .valuecontainer import ValueContainer # noqa from .variable import Variable # noqa from .variableitem import VariableItem # noqa from .vector3 import Vector3 # noqa diff --git a/src/simapy/sima/sima/blueprints/csvresult.py b/src/simapy/sima/sima/blueprints/csvresult.py new file mode 100644 index 00000000..cd7a1410 --- /dev/null +++ b/src/simapy/sima/sima/blueprints/csvresult.py @@ -0,0 +1,25 @@ +# +# Generated with CSVResultBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .result import ResultBlueprint + +class CSVResultBlueprint(ResultBlueprint): + """""" + + def __init__(self, name="CSVResult", package_path="sima/sima", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(BlueprintAttribute("properties","sima/sima/Property","",True,Dimension("*"))) + self.add_attribute(Attribute("resource","string","")) + self.add_attribute(Attribute("relative","boolean","",default=False)) + self.add_attribute(Attribute("_type","string","")) + self.add_attribute(Attribute("time","integer","",default=-1)) + self.add_attribute(Attribute("size","integer","",default=-1)) + self.add_attribute(Attribute("runNumber","integer","",default=-1)) + self.add_attribute(BlueprintAttribute("messages","sima/sima/SimaMessage","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/intvalue.py b/src/simapy/sima/sima/blueprints/intvalue.py new file mode 100644 index 00000000..1de9853b --- /dev/null +++ b/src/simapy/sima/sima/blueprints/intvalue.py @@ -0,0 +1,18 @@ +# +# Generated with IntValueBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .singlevalue import SingleValueBlueprint + +class IntValueBlueprint(SingleValueBlueprint): + """""" + + def __init__(self, name="IntValue", package_path="sima/sima", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("value","integer","",default=0)) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/numbervalue.py b/src/simapy/sima/sima/blueprints/numbervalue.py new file mode 100644 index 00000000..8b3960ad --- /dev/null +++ b/src/simapy/sima/sima/blueprints/numbervalue.py @@ -0,0 +1,19 @@ +# +# Generated with NumberValueBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .singlevalue import SingleValueBlueprint + +class NumberValueBlueprint(SingleValueBlueprint): + """""" + + def __init__(self, name="NumberValue", package_path="sima/sima", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("value","number","",default=0.0)) + self.add_attribute(Attribute("unit","string","",default='-')) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/scriptablevalue.py b/src/simapy/sima/sima/blueprints/scriptablevalue.py index e6a9a836..6f5a9ccb 100644 --- a/src/simapy/sima/sima/blueprints/scriptablevalue.py +++ b/src/simapy/sima/sima/blueprints/scriptablevalue.py @@ -13,7 +13,6 @@ class ScriptableValueBlueprint(EntityBlueprint): def __init__(self, name="ScriptableValue", package_path="sima/sima", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) - self.add_attribute(Attribute("_id","string","")) self.add_attribute(Attribute("script","string","")) self.add_attribute(Attribute("cyclic","boolean","",default=False)) self.add_attribute(Attribute("feature","string","")) diff --git a/src/simapy/sima/sima/blueprints/scriptingpreference.py b/src/simapy/sima/sima/blueprints/scriptingpreference.py index 59e15dae..609b4d90 100644 --- a/src/simapy/sima/sima/blueprints/scriptingpreference.py +++ b/src/simapy/sima/sima/blueprints/scriptingpreference.py @@ -14,7 +14,6 @@ def __init__(self, name="ScriptingPreference", package_path="sima/sima", descrip super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("showScripts","boolean","",default=False)) self.add_attribute(Attribute("javaScriptLocations","string","",Dimension("*"))) self.add_attribute(Attribute("pythonHome","string","Override python home folder")) self.add_attribute(Attribute("pythonPaths","string","",Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/report/blueprints/linkable.py b/src/simapy/sima/sima/blueprints/singlevalue.py similarity index 63% rename from src/simapy/sima/report/blueprints/linkable.py rename to src/simapy/sima/sima/blueprints/singlevalue.py index afaa79e6..90eea046 100644 --- a/src/simapy/sima/report/blueprints/linkable.py +++ b/src/simapy/sima/sima/blueprints/singlevalue.py @@ -1,17 +1,17 @@ # -# Generated with LinkableBlueprint +# Generated with SingleValueBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from ...sima.blueprints.moao import MOAOBlueprint +from .value import ValueBlueprint -class LinkableBlueprint(MOAOBlueprint): +class SingleValueBlueprint(ValueBlueprint): """""" - def __init__(self, name="Linkable", package_path="sima/report", description=""): + def __init__(self, name="SingleValue", package_path="sima/sima", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("identifier","string","")) \ No newline at end of file + self.add_attribute(Attribute("name","string","")) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/stringvalue.py b/src/simapy/sima/sima/blueprints/stringvalue.py new file mode 100644 index 00000000..d3b28a39 --- /dev/null +++ b/src/simapy/sima/sima/blueprints/stringvalue.py @@ -0,0 +1,18 @@ +# +# Generated with StringValueBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .singlevalue import SingleValueBlueprint + +class StringValueBlueprint(SingleValueBlueprint): + """""" + + def __init__(self, name="StringValue", package_path="sima/sima", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("value","string","")) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/moaofolder.py b/src/simapy/sima/sima/blueprints/value.py similarity index 57% rename from src/simapy/sima/sima/blueprints/moaofolder.py rename to src/simapy/sima/sima/blueprints/value.py index 6320ee45..9cf2c550 100644 --- a/src/simapy/sima/sima/blueprints/moaofolder.py +++ b/src/simapy/sima/sima/blueprints/value.py @@ -1,16 +1,17 @@ # -# Generated with MOAOFolderBlueprint +# Generated with ValueBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from dmt.blueprints.namedentity import NamedEntityBlueprint +from .named import NamedBlueprint -class MOAOFolderBlueprint(NamedEntityBlueprint): +class ValueBlueprint(NamedBlueprint): """""" - def __init__(self, name="MOAOFolder", package_path="sima/sima", description=""): + def __init__(self, name="Value", package_path="sima/sima", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("name","string","")) \ No newline at end of file diff --git a/src/simapy/sima/sima/blueprints/valuecontainer.py b/src/simapy/sima/sima/blueprints/valuecontainer.py new file mode 100644 index 00000000..bfa94fc4 --- /dev/null +++ b/src/simapy/sima/sima/blueprints/valuecontainer.py @@ -0,0 +1,18 @@ +# +# Generated with ValueContainerBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from .value import ValueBlueprint + +class ValueContainerBlueprint(ValueBlueprint): + """""" + + def __init__(self, name="ValueContainer", package_path="sima/sima", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(BlueprintAttribute("values","sima/sima/Value","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/sima/csvresult.py b/src/simapy/sima/sima/csvresult.py new file mode 100644 index 00000000..f05c2ab8 --- /dev/null +++ b/src/simapy/sima/sima/csvresult.py @@ -0,0 +1,176 @@ +# This an autogenerated file +# +# Generated with CSVResult +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.csvresult import CSVResultBlueprint +from typing import Dict +from .property import Property +from .result import Result +from .scriptablevalue import ScriptableValue +from .simamessage import SimaMessage + +class CSVResult(Result): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + properties : List[Property] + resource : str + (default None) + relative : bool + (default False) + _type : str + (default None) + time : int + (default -1) + size : int + (default -1) + runNumber : int + (default -1) + messages : List[SimaMessage] + """ + + def __init__(self , description="", relative=False, time=-1, size=-1, runNumber=-1, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.properties = list() + self.resource = None + self.relative = relative + self._type = None + self.time = time + self.size = size + self.runNumber = runNumber + self.messages = list() + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return CSVResultBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def properties(self) -> List[Property]: + """""" + return self.__properties + + @properties.setter + def properties(self, value: List[Property]): + """Set properties""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__properties = value + + @property + def resource(self) -> str: + """""" + return self.__resource + + @resource.setter + def resource(self, value: str): + """Set resource""" + self.__resource = value + + @property + def relative(self) -> bool: + """""" + return self.__relative + + @relative.setter + def relative(self, value: bool): + """Set relative""" + self.__relative = bool(value) + + @property + def _type(self) -> str: + """""" + return self.___type + + @_type.setter + def _type(self, value: str): + """Set _type""" + self.___type = value + + @property + def time(self) -> int: + """""" + return self.__time + + @time.setter + def time(self, value: int): + """Set time""" + self.__time = int(value) + + @property + def size(self) -> int: + """""" + return self.__size + + @size.setter + def size(self, value: int): + """Set size""" + self.__size = int(value) + + @property + def runNumber(self) -> int: + """""" + return self.__runNumber + + @runNumber.setter + def runNumber(self, value: int): + """Set runNumber""" + self.__runNumber = int(value) + + @property + def messages(self) -> List[SimaMessage]: + """""" + return self.__messages + + @messages.setter + def messages(self, value: List[SimaMessage]): + """Set messages""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__messages = value diff --git a/src/simapy/sima/sima/intvalue.py b/src/simapy/sima/sima/intvalue.py new file mode 100644 index 00000000..e8582c61 --- /dev/null +++ b/src/simapy/sima/sima/intvalue.py @@ -0,0 +1,81 @@ +# This an autogenerated file +# +# Generated with IntValue +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.intvalue import IntValueBlueprint +from typing import Dict +from .scriptablevalue import ScriptableValue +from .singlevalue import SingleValue + +class IntValue(SingleValue): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + value : int + (default 0) + """ + + def __init__(self , description="", value=0, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.value = value + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return IntValueBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def value(self) -> int: + """""" + return self.__value + + @value.setter + def value(self, value: int): + """Set value""" + self.__value = int(value) diff --git a/src/simapy/sima/sima/lengthunit.py b/src/simapy/sima/sima/lengthunit.py index 42aaa0af..703cddfc 100644 --- a/src/simapy/sima/sima/lengthunit.py +++ b/src/simapy/sima/sima/lengthunit.py @@ -7,9 +7,12 @@ class LengthUnit(Enum): """""" METER = auto() FEET = auto() + MILLIMETER = auto() def label(self): if self == LengthUnit.METER: return "m" if self == LengthUnit.FEET: - return "ft" \ No newline at end of file + return "ft" + if self == LengthUnit.MILLIMETER: + return "mm" \ No newline at end of file diff --git a/src/simapy/sima/sima/numbervalue.py b/src/simapy/sima/sima/numbervalue.py new file mode 100644 index 00000000..ad30b79d --- /dev/null +++ b/src/simapy/sima/sima/numbervalue.py @@ -0,0 +1,94 @@ +# This an autogenerated file +# +# Generated with NumberValue +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.numbervalue import NumberValueBlueprint +from typing import Dict +from .scriptablevalue import ScriptableValue +from .singlevalue import SingleValue + +class NumberValue(SingleValue): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + value : float + (default 0.0) + unit : str + (default '-') + """ + + def __init__(self , description="", value=0.0, unit='-', **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.value = value + self.unit = unit + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return NumberValueBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def value(self) -> float: + """""" + return self.__value + + @value.setter + def value(self, value: float): + """Set value""" + self.__value = float(value) + + @property + def unit(self) -> str: + """""" + return self.__unit + + @unit.setter + def unit(self, value: str): + """Set unit""" + self.__unit = value diff --git a/src/simapy/sima/sima/scriptablevalue.py b/src/simapy/sima/sima/scriptablevalue.py index 0ad1dd66..98eb8bf2 100644 --- a/src/simapy/sima/sima/scriptablevalue.py +++ b/src/simapy/sima/sima/scriptablevalue.py @@ -13,8 +13,6 @@ class ScriptableValue(Entity): ----------------- description : str (default "") - _id : str - (default None) script : str (default None) cyclic : bool @@ -28,7 +26,6 @@ class ScriptableValue(Entity): def __init__(self , description="", cyclic=False, index=-1, **kwargs): super().__init__(**kwargs) self.description = description - self._id = None self.script = None self.cyclic = cyclic self.feature = None @@ -54,16 +51,6 @@ def description(self, value: str): """Set description""" self.__description = value - @property - def _id(self) -> str: - """""" - return self.___id - - @_id.setter - def _id(self, value: str): - """Set _id""" - self.___id = value - @property def script(self) -> str: """""" diff --git a/src/simapy/sima/sima/scriptingpreference.py b/src/simapy/sima/sima/scriptingpreference.py index 329b2060..2fb179ba 100644 --- a/src/simapy/sima/sima/scriptingpreference.py +++ b/src/simapy/sima/sima/scriptingpreference.py @@ -15,19 +15,16 @@ class ScriptingPreference(SIMAPreference): description : str (default "") scriptableValues : List[ScriptableValue] - showScripts : bool - (default False) javaScriptLocations : ndarray of str pythonHome : str Override python home folder(default None) pythonPaths : ndarray of str """ - def __init__(self , description="", showScripts=False, **kwargs): + def __init__(self , description="", **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() - self.showScripts = showScripts self.javaScriptLocations = [] self.pythonHome = None self.pythonPaths = [] @@ -64,16 +61,6 @@ def scriptableValues(self, value: List[ScriptableValue]): raise ValueError("Expected sequense, but was " , type(value)) self.__scriptableValues = value - @property - def showScripts(self) -> bool: - """""" - return self.__showScripts - - @showScripts.setter - def showScripts(self, value: bool): - """Set showScripts""" - self.__showScripts = bool(value) - @property def javaScriptLocations(self) -> ndarray: """""" diff --git a/src/simapy/sima/sima/singlevalue.py b/src/simapy/sima/sima/singlevalue.py new file mode 100644 index 00000000..1bb583de --- /dev/null +++ b/src/simapy/sima/sima/singlevalue.py @@ -0,0 +1,68 @@ +# This an autogenerated file +# +# Generated with SingleValue +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.singlevalue import SingleValueBlueprint +from typing import Dict +from .scriptablevalue import ScriptableValue +from .value import Value + +class SingleValue(Value): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + """ + + def __init__(self , description="", **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return SingleValueBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value diff --git a/src/simapy/sima/sima/stringvalue.py b/src/simapy/sima/sima/stringvalue.py new file mode 100644 index 00000000..4e808bf8 --- /dev/null +++ b/src/simapy/sima/sima/stringvalue.py @@ -0,0 +1,81 @@ +# This an autogenerated file +# +# Generated with StringValue +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.stringvalue import StringValueBlueprint +from typing import Dict +from .scriptablevalue import ScriptableValue +from .singlevalue import SingleValue + +class StringValue(SingleValue): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + value : str + (default None) + """ + + def __init__(self , description="", **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.value = None + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return StringValueBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def value(self) -> str: + """""" + return self.__value + + @value.setter + def value(self, value: str): + """Set value""" + self.__value = value diff --git a/src/simapy/sima/sima/moaofolder.py b/src/simapy/sima/sima/value.py similarity index 61% rename from src/simapy/sima/sima/moaofolder.py rename to src/simapy/sima/sima/value.py index 154e51b9..03809ec6 100644 --- a/src/simapy/sima/sima/moaofolder.py +++ b/src/simapy/sima/sima/value.py @@ -1,18 +1,20 @@ # This an autogenerated file # -# Generated with MOAOFolder +# Generated with Value from typing import Dict,Sequence,List from dmt.blueprint import Blueprint -from .blueprints.moaofolder import MOAOFolderBlueprint +from .blueprints.value import ValueBlueprint from typing import Dict -from dmt.namedentity import NamedEntity +from .named import Named +from .scriptablevalue import ScriptableValue -class MOAOFolder(NamedEntity): +class Value(Named): """ Keyword arguments ----------------- description : str (default "") + scriptableValues : List[ScriptableValue] name : str (default None) """ @@ -20,6 +22,7 @@ class MOAOFolder(NamedEntity): def __init__(self , description="", **kwargs): super().__init__(**kwargs) self.description = description + self.scriptableValues = list() self.name = None for key, value in kwargs.items(): if not isinstance(value, Dict): @@ -29,7 +32,7 @@ def __init__(self , description="", **kwargs): @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" - return MOAOFolderBlueprint() + return ValueBlueprint() @property @@ -42,6 +45,18 @@ def description(self, value: str): """Set description""" self.__description = value + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + @property def name(self) -> str: """""" diff --git a/src/simapy/sima/sima/valuecontainer.py b/src/simapy/sima/sima/valuecontainer.py new file mode 100644 index 00000000..ae96943f --- /dev/null +++ b/src/simapy/sima/sima/valuecontainer.py @@ -0,0 +1,82 @@ +# This an autogenerated file +# +# Generated with ValueContainer +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.valuecontainer import ValueContainerBlueprint +from typing import Dict +from .scriptablevalue import ScriptableValue +from .value import Value + +class ValueContainer(Value): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + values : List[Value] + """ + + def __init__(self , description="", **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.values = list() + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return ValueContainerBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def values(self) -> List[Value]: + """""" + return self.__values + + @values.setter + def values(self, value: List[Value]): + """Set values""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__values = value diff --git a/src/simapy/sima/simo/__init__.py b/src/simapy/sima/simo/__init__.py index 797bc981..098dc82b 100644 --- a/src/simapy/sima/simo/__init__.py +++ b/src/simapy/sima/simo/__init__.py @@ -6,6 +6,7 @@ from .axialstiffnessitem import AxialStiffnessItem # noqa from .ballastsystem import BallastSystem # noqa from .ballasttank import BallastTank # noqa +from .ballasttankpressuremeasurement import BallastTankPressureMeasurement # noqa from .bladeitem import BladeItem # noqa from .bodyeigenvalueitem import BodyEigenvalueItem # noqa from .bodyeigenvalueresult import BodyEigenvalueResult # noqa @@ -44,7 +45,7 @@ from .externalcontrolsystem import ExternalControlSystem # noqa from .externaldllforce import ExternalDLLForce # noqa from .externalforcefromfile import ExternalForceFromFile # noqa -from .externalhlaforce import ExternalHLAForce # noqa +from .externalpythonforce import ExternalPythonForce # noqa from .fibreropemodel import FibreRopeModel # noqa from .fixedbodyelement import FixedBodyElement # noqa from .fixedelongationcoupling import FixedElongationCoupling # noqa @@ -121,6 +122,7 @@ from .simoresultcontainer import SIMOResultContainer # noqa from .simostaticcalculationparameters import SIMOStaticCalculationParameters # noqa from .simostaticresultentry import SIMOStaticResultEntry # noqa +from .simostaticresultstorageparameters import SIMOStaticResultStorageParameters # noqa from .simotask import SIMOTask # noqa from .simotensioner import SIMOTensioner # noqa from .simplecoupling import SimpleCoupling # noqa diff --git a/src/simapy/sima/simo/ballasttank.py b/src/simapy/sima/simo/ballasttank.py index 773f0e84..db90a8a4 100644 --- a/src/simapy/sima/simo/ballasttank.py +++ b/src/simapy/sima/simo/ballasttank.py @@ -9,6 +9,7 @@ from ..sima import Position from ..sima import ScriptableValue from .ballastquantitytype import BallastQuantityType +from .ballasttankpressuremeasurement import BallastTankPressureMeasurement from .ballasttankstate import BallastTankState class BallastTank(NamedObject): @@ -42,6 +43,7 @@ class BallastTank(NamedObject): Geometry definition file ( STL or GDF)(default None) state : BallastTankState State of ballast tank + pressureMeasurements : List[BallastTankPressureMeasurement] """ def __init__(self , description="", x=0.0, y=0.0, z=0.0, volumeTolerance=0.001, permeabilityFactor=1.0, initialBallastQuantity=0.0, quantityType=BallastQuantityType.PERCENTAGE, ballastFluidDensity=1025.0, state=BallastTankState.INTACT, **kwargs): @@ -61,6 +63,7 @@ def __init__(self , description="", x=0.0, y=0.0, z=0.0, volumeTolerance=0.001, self.geometryPosition = None self.geometryFile = None self.state = state + self.pressureMeasurements = list() for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -223,3 +226,15 @@ def state(self) -> BallastTankState: def state(self, value: BallastTankState): """Set state""" self.__state = value + + @property + def pressureMeasurements(self) -> List[BallastTankPressureMeasurement]: + """""" + return self.__pressureMeasurements + + @pressureMeasurements.setter + def pressureMeasurements(self, value: List[BallastTankPressureMeasurement]): + """Set pressureMeasurements""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__pressureMeasurements = value diff --git a/src/simapy/sima/simo/ballasttankpressuremeasurement.py b/src/simapy/sima/simo/ballasttankpressuremeasurement.py new file mode 100644 index 00000000..d27281df --- /dev/null +++ b/src/simapy/sima/simo/ballasttankpressuremeasurement.py @@ -0,0 +1,107 @@ +# This an autogenerated file +# +# Generated with BallastTankPressureMeasurement +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.ballasttankpressuremeasurement import BallastTankPressureMeasurementBlueprint +from typing import Dict +from ..sima import Named +from ..sima import ScriptableValue + +class BallastTankPressureMeasurement(Named): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + x : float + Local x position(default 0.0) + y : float + Local y position(default 0.0) + z : float + Local z position(default 0.0) + """ + + def __init__(self , description="", x=0.0, y=0.0, z=0.0, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.x = x + self.y = y + self.z = z + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return BallastTankPressureMeasurementBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def x(self) -> float: + """Local x position""" + return self.__x + + @x.setter + def x(self, value: float): + """Set x""" + self.__x = float(value) + + @property + def y(self) -> float: + """Local y position""" + return self.__y + + @y.setter + def y(self, value: float): + """Set y""" + self.__y = float(value) + + @property + def z(self) -> float: + """Local z position""" + return self.__z + + @z.setter + def z(self, value: float): + """Set z""" + self.__z = float(value) diff --git a/src/simapy/sima/simo/blueprints/ballasttank.py b/src/simapy/sima/simo/blueprints/ballasttank.py index 9c8a2f1d..612944bd 100644 --- a/src/simapy/sima/simo/blueprints/ballasttank.py +++ b/src/simapy/sima/simo/blueprints/ballasttank.py @@ -26,4 +26,5 @@ def __init__(self, name="BallastTank", package_path="sima/simo", description="") self.add_attribute(Attribute("ballastFluidDensity","number","Density of the fluid used as ballast",default=1025.0)) self.add_attribute(BlueprintAttribute("geometryPosition","sima/sima/Position","",True)) self.add_attribute(Attribute("geometryFile","string","Geometry definition file ( STL or GDF)")) - self.add_attribute(EnumAttribute("state","sima/simo/BallastTankState","State of ballast tank")) \ No newline at end of file + self.add_attribute(EnumAttribute("state","sima/simo/BallastTankState","State of ballast tank")) + self.add_attribute(BlueprintAttribute("pressureMeasurements","sima/simo/BallastTankPressureMeasurement","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/ballasttankpressuremeasurement.py b/src/simapy/sima/simo/blueprints/ballasttankpressuremeasurement.py new file mode 100644 index 00000000..64aed61c --- /dev/null +++ b/src/simapy/sima/simo/blueprints/ballasttankpressuremeasurement.py @@ -0,0 +1,20 @@ +# +# Generated with BallastTankPressureMeasurementBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.named import NamedBlueprint + +class BallastTankPressureMeasurementBlueprint(NamedBlueprint): + """""" + + def __init__(self, name="BallastTankPressureMeasurement", package_path="sima/simo", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("x","number","Local x position",default=0.0)) + self.add_attribute(Attribute("y","number","Local y position",default=0.0)) + self.add_attribute(Attribute("z","number","Local z position",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/catenaryline.py b/src/simapy/sima/simo/blueprints/catenaryline.py index 6b2a0e48..4b62a8c7 100644 --- a/src/simapy/sima/simo/blueprints/catenaryline.py +++ b/src/simapy/sima/simo/blueprints/catenaryline.py @@ -19,7 +19,6 @@ def __init__(self, name="CatenaryLine", package_path="sima/simo", description="" self.add_attribute(Attribute("direction","number","Direction of line in horizontal plane",default=0.0)) self.add_attribute(Attribute("xglobal","number","X-coordinate of the anchor in global coordinate\nsystem",default=0.0)) self.add_attribute(Attribute("yglobal","number","Y-coordinate of the anchor in global coordinate\nsystem",default=0.0)) - self.add_attribute(Attribute("xwinch","number","Run length of winch",default=0.0)) self.add_attribute(Attribute("xhor","number","Horizontal distance from attachment point\nto anchor",default=0.0)) self.add_attribute(Attribute("pretension","number","Pretension",default=0.0)) self.add_attribute(BlueprintAttribute("lineType","sima/simo/LineType","",False)) diff --git a/src/simapy/sima/simo/blueprints/externaldllforce.py b/src/simapy/sima/simo/blueprints/externaldllforce.py index 9ef7847b..cb2210c4 100644 --- a/src/simapy/sima/simo/blueprints/externaldllforce.py +++ b/src/simapy/sima/simo/blueprints/externaldllforce.py @@ -15,12 +15,12 @@ def __init__(self, name="ExternalDLLForce", package_path="sima/simo", descriptio self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("name","string","")) - self.add_attribute(BlueprintAttribute("attachmentPoint","sima/sima/Point3","Attack point of force.",True)) - self.add_attribute(EnumAttribute("referenceFrame","sima/simo/ReferenceFrameType","Which coordinate system is the force is given in?")) + self.add_attribute(Attribute("nCurrentPoints","integer","Number of points where current velocities shall be given.",default=1)) + self.add_attribute(Attribute("dllFile","string","")) + self.add_attribute(BlueprintAttribute("libraryPaths","sima/sima/LibraryPaths","",True)) self.add_attribute(Attribute("nStorageParameters","integer","Number of parameters for intermediate storage",default=0)) self.add_attribute(BlueprintAttribute("intParameters","sima/simo/StringIntItem","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("doubleParameters","sima/simo/StringDoubleItem","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("stringParameters","sima/simo/StringItem","",True,Dimension("*"))) - self.add_attribute(Attribute("nCurrentPoints","integer","Number of points where current velocities shall be given.",default=1)) - self.add_attribute(Attribute("dllFile","string","")) - self.add_attribute(BlueprintAttribute("libraryPaths","sima/sima/LibraryPaths","",True)) \ No newline at end of file + self.add_attribute(EnumAttribute("referenceFrame","sima/simo/ReferenceFrameType","Which coordinate system is the force is given in?")) + self.add_attribute(BlueprintAttribute("attachmentPoint","sima/sima/Point3","Attack point of force.",True)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/externalforcefromfile.py b/src/simapy/sima/simo/blueprints/externalforcefromfile.py index 90224985..b0c704d7 100644 --- a/src/simapy/sima/simo/blueprints/externalforcefromfile.py +++ b/src/simapy/sima/simo/blueprints/externalforcefromfile.py @@ -15,9 +15,9 @@ def __init__(self, name="ExternalForceFromFile", package_path="sima/simo", descr self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("name","string","")) - self.add_attribute(Attribute("forceFile","string","' File heading, arbitrary number of lines with \n' apostrophe in the first position of the input line\nNCOL: Number of columns (=6)\nNROW: Number of rows (i.e. no. of time incidents)\nSAMP: Sampling interval [T]\nForce components, NROW lines (one per time incident)\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\n")) self.add_attribute(EnumAttribute("referenceFrame","sima/simo/ReferenceFrameType","Which coordinate system is the force is given in?")) self.add_attribute(BlueprintAttribute("attachmentPoint","sima/sima/Point3","Attack point of force.",True)) + self.add_attribute(Attribute("forceFile","string","' File heading, arbitrary number of lines with \n' apostrophe in the first position of the input line\nNCOL: Number of columns (=6)\nNROW: Number of rows (i.e. no. of time incidents)\nSAMP: Sampling interval [T]\nForce components, NROW lines (one per time incident)\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\n")) self.add_attribute(Attribute("fx","number","Force in X-direction",default=0.0)) self.add_attribute(Attribute("fy","number","Force in Y-direction",default=0.0)) self.add_attribute(Attribute("fz","number","Force in Z-direction",default=0.0)) diff --git a/src/simapy/sima/simo/blueprints/externalhlaforce.py b/src/simapy/sima/simo/blueprints/externalhlaforce.py deleted file mode 100644 index 9543666c..00000000 --- a/src/simapy/sima/simo/blueprints/externalhlaforce.py +++ /dev/null @@ -1,30 +0,0 @@ -# -# Generated with ExternalHLAForceBlueprint -from dmt.blueprint import Blueprint -from dmt.dimension import Dimension -from dmt.attribute import Attribute -from dmt.enum_attribute import EnumAttribute -from dmt.blueprint_attribute import BlueprintAttribute -from ...sima.blueprints.namedobject import NamedObjectBlueprint - -class ExternalHLAForceBlueprint(NamedObjectBlueprint): - """""" - - def __init__(self, name="ExternalHLAForce", package_path="sima/simo", description=""): - super().__init__(name,package_path,description) - self.add_attribute(Attribute("description","string","",default="")) - self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) - self.add_attribute(Attribute("name","string","")) - self.add_attribute(BlueprintAttribute("attachmentPoint","sima/sima/Point3","Attack point of force.",True)) - self.add_attribute(EnumAttribute("referenceFrame","sima/simo/ReferenceFrameType","Which coordinate system is the force is given in?")) - self.add_attribute(Attribute("nStorageParameters","integer","Number of parameters for intermediate storage",default=0)) - self.add_attribute(BlueprintAttribute("intParameters","sima/simo/StringIntItem","",True,Dimension("*"))) - self.add_attribute(BlueprintAttribute("doubleParameters","sima/simo/StringDoubleItem","",True,Dimension("*"))) - self.add_attribute(BlueprintAttribute("stringParameters","sima/simo/StringItem","",True,Dimension("*"))) - self.add_attribute(Attribute("importAttackPoint","boolean","",default=False)) - self.add_attribute(Attribute("fx","number","Force in X-direction",default=0.0)) - self.add_attribute(Attribute("fy","number","Force in Y-direction",default=0.0)) - self.add_attribute(Attribute("fz","number","Force in Z-direction",default=0.0)) - self.add_attribute(Attribute("mx","number","Moment about X-axis",default=0.0)) - self.add_attribute(Attribute("my","number","Moment about Y-axis",default=0.0)) - self.add_attribute(Attribute("mz","number","Moment about Z-axis",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/externalpythonforce.py b/src/simapy/sima/simo/blueprints/externalpythonforce.py new file mode 100644 index 00000000..9e09ad76 --- /dev/null +++ b/src/simapy/sima/simo/blueprints/externalpythonforce.py @@ -0,0 +1,20 @@ +# +# Generated with ExternalPythonForceBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.namedobject import NamedObjectBlueprint + +class ExternalPythonForceBlueprint(NamedObjectBlueprint): + """""" + + def __init__(self, name="ExternalPythonForce", package_path="sima/simo", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("file","string","")) + self.add_attribute(Attribute("className","string","Python class name contained in the python file",default='0')) + self.add_attribute(BlueprintAttribute("parameters","sima/sima/SingleValue","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/guidepoint.py b/src/simapy/sima/simo/blueprints/guidepoint.py index ce4913ee..9aeea328 100644 --- a/src/simapy/sima/simo/blueprints/guidepoint.py +++ b/src/simapy/sima/simo/blueprints/guidepoint.py @@ -18,8 +18,8 @@ def __init__(self, name="GuidePoint", package_path="sima/simo", description=""): self.add_attribute(BlueprintAttribute("winch","sima/simo/Winch","",True)) self.add_attribute(BlueprintAttribute("tensioner","sima/simo/SIMOTensioner","",True)) self.add_attribute(BlueprintAttribute("heaveCompensator","sima/simo/SIMOHeaveCompensator","",True)) - self.add_attribute(Attribute("x","number","Local x position",default=0.0)) - self.add_attribute(Attribute("y","number","Local y position",default=0.0)) - self.add_attribute(Attribute("z","number","Local z position",default=0.0)) + self.add_attribute(Attribute("x","number","X-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) + self.add_attribute(Attribute("y","number","Y-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) + self.add_attribute(Attribute("z","number","Z-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) self.add_attribute(Attribute("diameter","number","Diameter of guide hole",default=0.0)) self.add_attribute(BlueprintAttribute("normalVector","sima/sima/Vector3","Vector normal to hole in body fixed coordinate system",True)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/linesegment.py b/src/simapy/sima/simo/blueprints/linesegment.py index 8a40c394..2820abfc 100644 --- a/src/simapy/sima/simo/blueprints/linesegment.py +++ b/src/simapy/sima/simo/blueprints/linesegment.py @@ -21,7 +21,7 @@ def __init__(self, name="LineSegment", package_path="sima/simo", description="") self.add_attribute(Attribute("bottomFriction","number","Friction coefficient between line and sea bottom",default=0.0)) self.add_attribute(Attribute("diameter","number","Segment diameter",default=0.0)) self.add_attribute(Attribute("eMod","number","Modulus of elasticity",default=0.0)) - self.add_attribute(Attribute("emFac","number","Factor of elasticity - 2 for chains - 1 for other segment types",default=1.0)) + self.add_attribute(Attribute("emFac","number","Factor of elasticity",default=1.0)) self.add_attribute(Attribute("transverseDrag","number","Transverse drag coefficient",default=0.0)) self.add_attribute(Attribute("longitudinalDrag","number","Longitudinal drag coefficient",default=0.0)) self.add_attribute(Attribute("uwia","number","Unit weight in air",default=0.0)) diff --git a/src/simapy/sima/simo/blueprints/simobody.py b/src/simapy/sima/simo/blueprints/simobody.py index 7aa8e7bf..73e44887 100644 --- a/src/simapy/sima/simo/blueprints/simobody.py +++ b/src/simapy/sima/simo/blueprints/simobody.py @@ -53,7 +53,7 @@ def __init__(self, name="SIMOBody", package_path="sima/simo", description=""): self.add_attribute(BlueprintAttribute("controlSystem","sima/simo/ControlSystem","",True)) self.add_attribute(BlueprintAttribute("slenderElements","sima/simo/SlenderElement","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("externalDLLForces","sima/simo/ExternalDLLForce","",True,Dimension("*"))) - self.add_attribute(BlueprintAttribute("externalHLAForces","sima/simo/ExternalHLAForce","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("externalPythonForces","sima/simo/ExternalPythonForce","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("externalForcesFromFile","sima/simo/ExternalForceFromFile","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("fixedBodyElements","sima/simo/FixedBodyElement","",True,Dimension("*"))) self.add_attribute(BlueprintAttribute("timeDependentPointMasses","sima/simo/TimeDependentPointMass","",True,Dimension("*"))) diff --git a/src/simapy/sima/simo/blueprints/simobodypoint.py b/src/simapy/sima/simo/blueprints/simobodypoint.py index 6f097704..8354e2d8 100644 --- a/src/simapy/sima/simo/blueprints/simobodypoint.py +++ b/src/simapy/sima/simo/blueprints/simobodypoint.py @@ -19,6 +19,6 @@ def __init__(self, name="SIMOBodyPoint", package_path="sima/simo", description=" self.add_attribute(BlueprintAttribute("winch","sima/simo/Winch","",True)) self.add_attribute(BlueprintAttribute("tensioner","sima/simo/SIMOTensioner","",True)) self.add_attribute(BlueprintAttribute("heaveCompensator","sima/simo/SIMOHeaveCompensator","",True)) - self.add_attribute(Attribute("x","number","Local x position",default=0.0)) - self.add_attribute(Attribute("y","number","Local y position",default=0.0)) - self.add_attribute(Attribute("z","number","Local z position",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("x","number","X-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) + self.add_attribute(Attribute("y","number","Y-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) + self.add_attribute(Attribute("z","number","Z-coordinate of attachment point in body fixed (local) coordinate system",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/simostaticcalculationparameters.py b/src/simapy/sima/simo/blueprints/simostaticcalculationparameters.py index 63c57c09..0110c16a 100644 --- a/src/simapy/sima/simo/blueprints/simostaticcalculationparameters.py +++ b/src/simapy/sima/simo/blueprints/simostaticcalculationparameters.py @@ -33,4 +33,5 @@ def __init__(self, name="SIMOStaticCalculationParameters", package_path="sima/si self.add_attribute(BlueprintAttribute("restrainFromGlobalDOFBodies","sima/simo/DOFElimination","",True,Dimension("*"))) self.add_attribute(Attribute("multipleEquilibriumCalculations","boolean","",default=False)) self.add_attribute(BlueprintAttribute("equilibriumGridDefinition","sima/simo/EquilibriumGridDefinition","",True)) - self.add_attribute(Attribute("requireSuccessfulCalculation","boolean","When checked, static calculation will fail if no equilibrium position is found",default=True)) \ No newline at end of file + self.add_attribute(Attribute("requireSuccessfulCalculation","boolean","When checked, static calculation will fail if no equilibrium position is found",default=True)) + self.add_attribute(BlueprintAttribute("storageParameters","sima/simo/SIMOStaticResultStorageParameters","",True)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/simostaticresultstorageparameters.py b/src/simapy/sima/simo/blueprints/simostaticresultstorageparameters.py new file mode 100644 index 00000000..a3a753e1 --- /dev/null +++ b/src/simapy/sima/simo/blueprints/simostaticresultstorageparameters.py @@ -0,0 +1,17 @@ +# +# Generated with SIMOStaticResultStorageParametersBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...sima.blueprints.moao import MOAOBlueprint + +class SIMOStaticResultStorageParametersBlueprint(MOAOBlueprint): + """""" + + def __init__(self, name="SIMOStaticResultStorageParameters", package_path="sima/simo", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("storeCatenaryLinesResults","boolean","Store results for Catenary lines?",default=False)) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/simotask.py b/src/simapy/sima/simo/blueprints/simotask.py index 96e560b8..72d770b1 100644 --- a/src/simapy/sima/simo/blueprints/simotask.py +++ b/src/simapy/sima/simo/blueprints/simotask.py @@ -27,5 +27,4 @@ def __init__(self, name="SIMOTask", package_path="sima/simo", description=""): self.add_attribute(BlueprintAttribute("model","sima/simo/SIMOModel","",True)) self.add_attribute(Attribute("simoMemory","integer","Enables override of the default memory settings for SIMO. Given in MB",default=128)) self.add_attribute(Attribute("removeIntermediateFiles","boolean","",default=True)) - self.add_attribute(EnumAttribute("exportMassUnit","sima/simo/MassUnit","Used as export unit for mass ( and indirectly force)")) - self.add_attribute(Attribute("exportAsFMU","boolean","Generate FMU (Functional Mockup Unit) from model",default=False)) \ No newline at end of file + self.add_attribute(EnumAttribute("exportMassUnit","sima/simo/MassUnit","Used as export unit for mass ( and indirectly force)")) \ No newline at end of file diff --git a/src/simapy/sima/simo/blueprints/stringdoubleitem.py b/src/simapy/sima/simo/blueprints/stringdoubleitem.py index cbdf6226..2677a3fa 100644 --- a/src/simapy/sima/simo/blueprints/stringdoubleitem.py +++ b/src/simapy/sima/simo/blueprints/stringdoubleitem.py @@ -15,4 +15,5 @@ def __init__(self, name="StringDoubleItem", package_path="sima/simo", descriptio self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) self.add_attribute(Attribute("text","string","")) - self.add_attribute(Attribute("value","number","",default=0.0)) \ No newline at end of file + self.add_attribute(Attribute("value","number","",default=0.0)) + self.add_attribute(Attribute("unit","string","",default='-')) \ No newline at end of file diff --git a/src/simapy/sima/simo/bodyresult.py b/src/simapy/sima/simo/bodyresult.py index 9660cdad..917b023f 100644 --- a/src/simapy/sima/simo/bodyresult.py +++ b/src/simapy/sima/simo/bodyresult.py @@ -1,7 +1,6 @@ # This an autogenerated file # # Generated with BodyResult -from __future__ import annotations from typing import Dict,Sequence,List from dmt.blueprint import Blueprint from .blueprints.bodyresult import BodyResultBlueprint @@ -11,9 +10,7 @@ from ..sima import ScriptableValue from .couplingelementresult import CouplingElementResult from .forceresult import ForceResult -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from .positioningelementresult import PositioningElementResult +from .positioningelementresult import PositioningElementResult class BodyResult(MOAO): """ diff --git a/src/simapy/sima/simo/catenaryline.py b/src/simapy/sima/simo/catenaryline.py index a7a07dc0..e9a6b670 100644 --- a/src/simapy/sima/simo/catenaryline.py +++ b/src/simapy/sima/simo/catenaryline.py @@ -31,8 +31,6 @@ class CatenaryLine(NamedObject): X-coordinate of the anchor in global coordinate\nsystem(default 0.0) yglobal : float Y-coordinate of the anchor in global coordinate\nsystem(default 0.0) - xwinch : float - Run length of winch(default 0.0) xhor : float Horizontal distance from attachment point\nto anchor(default 0.0) pretension : float @@ -48,7 +46,7 @@ class CatenaryLine(NamedObject): Breaking strength(default 0.0) """ - def __init__(self , description="", direction=0.0, xglobal=0.0, yglobal=0.0, xwinch=0.0, xhor=0.0, pretension=0.0, inputMethod=InputMethodType.TENSION, failureMode=FailureMode.NONE, failureTime=0.0, breakingStrength=0.0, **kwargs): + def __init__(self , description="", direction=0.0, xglobal=0.0, yglobal=0.0, xhor=0.0, pretension=0.0, inputMethod=InputMethodType.TENSION, failureMode=FailureMode.NONE, failureTime=0.0, breakingStrength=0.0, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -57,7 +55,6 @@ def __init__(self , description="", direction=0.0, xglobal=0.0, yglobal=0.0, xwi self.direction = direction self.xglobal = xglobal self.yglobal = yglobal - self.xwinch = xwinch self.xhor = xhor self.pretension = pretension self.lineType = None @@ -150,16 +147,6 @@ def yglobal(self, value: float): """Set yglobal""" self.__yglobal = float(value) - @property - def xwinch(self) -> float: - """Run length of winch""" - return self.__xwinch - - @xwinch.setter - def xwinch(self, value: float): - """Set xwinch""" - self.__xwinch = float(value) - @property def xhor(self) -> float: """Horizontal distance from attachment point diff --git a/src/simapy/sima/simo/externaldllforce.py b/src/simapy/sima/simo/externaldllforce.py index ac89e576..a9beef4b 100644 --- a/src/simapy/sima/simo/externaldllforce.py +++ b/src/simapy/sima/simo/externaldllforce.py @@ -23,36 +23,36 @@ class ExternalDLLForce(NamedObject): scriptableValues : List[ScriptableValue] name : str (default None) - attachmentPoint : Point3 - Attack point of force. - referenceFrame : ReferenceFrameType - Which coordinate system is the force is given in? - nStorageParameters : int - Number of parameters for intermediate storage(default 0) - intParameters : List[StringIntItem] - doubleParameters : List[StringDoubleItem] - stringParameters : List[StringItem] nCurrentPoints : int Number of points where current velocities shall be given.(default 1) dllFile : str (default None) libraryPaths : LibraryPaths + nStorageParameters : int + Number of parameters for intermediate storage(default 0) + intParameters : List[StringIntItem] + doubleParameters : List[StringDoubleItem] + stringParameters : List[StringItem] + referenceFrame : ReferenceFrameType + Which coordinate system is the force is given in? + attachmentPoint : Point3 + Attack point of force. """ - def __init__(self , description="", referenceFrame=ReferenceFrameType.LOCAL, nStorageParameters=0, nCurrentPoints=1, **kwargs): + def __init__(self , description="", nCurrentPoints=1, nStorageParameters=0, referenceFrame=ReferenceFrameType.LOCAL, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.name = None - self.attachmentPoint = None - self.referenceFrame = referenceFrame + self.nCurrentPoints = nCurrentPoints + self.dllFile = None + self.libraryPaths = None self.nStorageParameters = nStorageParameters self.intParameters = list() self.doubleParameters = list() self.stringParameters = list() - self.nCurrentPoints = nCurrentPoints - self.dllFile = None - self.libraryPaths = None + self.referenceFrame = referenceFrame + self.attachmentPoint = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -97,24 +97,34 @@ def name(self, value: str): self.__name = value @property - def attachmentPoint(self) -> Point3: - """Attack point of force.""" - return self.__attachmentPoint + def nCurrentPoints(self) -> int: + """Number of points where current velocities shall be given.""" + return self.__nCurrentPoints - @attachmentPoint.setter - def attachmentPoint(self, value: Point3): - """Set attachmentPoint""" - self.__attachmentPoint = value + @nCurrentPoints.setter + def nCurrentPoints(self, value: int): + """Set nCurrentPoints""" + self.__nCurrentPoints = int(value) @property - def referenceFrame(self) -> ReferenceFrameType: - """Which coordinate system is the force is given in?""" - return self.__referenceFrame + def dllFile(self) -> str: + """""" + return self.__dllFile - @referenceFrame.setter - def referenceFrame(self, value: ReferenceFrameType): - """Set referenceFrame""" - self.__referenceFrame = value + @dllFile.setter + def dllFile(self, value: str): + """Set dllFile""" + self.__dllFile = value + + @property + def libraryPaths(self) -> LibraryPaths: + """""" + return self.__libraryPaths + + @libraryPaths.setter + def libraryPaths(self, value: LibraryPaths): + """Set libraryPaths""" + self.__libraryPaths = value @property def nStorageParameters(self) -> int: @@ -163,31 +173,21 @@ def stringParameters(self, value: List[StringItem]): self.__stringParameters = value @property - def nCurrentPoints(self) -> int: - """Number of points where current velocities shall be given.""" - return self.__nCurrentPoints - - @nCurrentPoints.setter - def nCurrentPoints(self, value: int): - """Set nCurrentPoints""" - self.__nCurrentPoints = int(value) - - @property - def dllFile(self) -> str: - """""" - return self.__dllFile + def referenceFrame(self) -> ReferenceFrameType: + """Which coordinate system is the force is given in?""" + return self.__referenceFrame - @dllFile.setter - def dllFile(self, value: str): - """Set dllFile""" - self.__dllFile = value + @referenceFrame.setter + def referenceFrame(self, value: ReferenceFrameType): + """Set referenceFrame""" + self.__referenceFrame = value @property - def libraryPaths(self) -> LibraryPaths: - """""" - return self.__libraryPaths + def attachmentPoint(self) -> Point3: + """Attack point of force.""" + return self.__attachmentPoint - @libraryPaths.setter - def libraryPaths(self, value: LibraryPaths): - """Set libraryPaths""" - self.__libraryPaths = value + @attachmentPoint.setter + def attachmentPoint(self, value: Point3): + """Set attachmentPoint""" + self.__attachmentPoint = value diff --git a/src/simapy/sima/simo/externalforcefromfile.py b/src/simapy/sima/simo/externalforcefromfile.py index 444db962..a0e7a0fa 100644 --- a/src/simapy/sima/simo/externalforcefromfile.py +++ b/src/simapy/sima/simo/externalforcefromfile.py @@ -19,12 +19,12 @@ class ExternalForceFromFile(NamedObject): scriptableValues : List[ScriptableValue] name : str (default None) - forceFile : str - ' File heading, arbitrary number of lines with \n' apostrophe in the first position of the input line\nNCOL: Number of columns (=6)\nNROW: Number of rows (i.e. no. of time incidents)\nSAMP: Sampling interval [T]\nForce components, NROW lines (one per time incident)\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\n(default None) referenceFrame : ReferenceFrameType Which coordinate system is the force is given in? attachmentPoint : Point3 Attack point of force. + forceFile : str + ' File heading, arbitrary number of lines with \n' apostrophe in the first position of the input line\nNCOL: Number of columns (=6)\nNROW: Number of rows (i.e. no. of time incidents)\nSAMP: Sampling interval [T]\nForce components, NROW lines (one per time incident)\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\nFX FY FZ MX MY MZ\n(default None) fx : float Force in X-direction(default 0.0) fy : float @@ -44,9 +44,9 @@ def __init__(self , description="", referenceFrame=ReferenceFrameType.LOCAL, fx= self.description = description self.scriptableValues = list() self.name = None - self.forceFile = None self.referenceFrame = referenceFrame self.attachmentPoint = None + self.forceFile = None self.fx = fx self.fy = fy self.fz = fz @@ -96,26 +96,6 @@ def name(self, value: str): """Set name""" self.__name = value - @property - def forceFile(self) -> str: - """' File heading, arbitrary number of lines with -' apostrophe in the first position of the input line -NCOL: Number of columns (=6) -NROW: Number of rows (i.e. no. of time incidents) -SAMP: Sampling interval [T] -Force components, NROW lines (one per time incident) -FX FY FZ MX MY MZ -FX FY FZ MX MY MZ -FX FY FZ MX MY MZ -FX FY FZ MX MY MZ -""" - return self.__forceFile - - @forceFile.setter - def forceFile(self, value: str): - """Set forceFile""" - self.__forceFile = value - @property def referenceFrame(self) -> ReferenceFrameType: """Which coordinate system is the force is given in?""" @@ -136,6 +116,26 @@ def attachmentPoint(self, value: Point3): """Set attachmentPoint""" self.__attachmentPoint = value + @property + def forceFile(self) -> str: + """' File heading, arbitrary number of lines with +' apostrophe in the first position of the input line +NCOL: Number of columns (=6) +NROW: Number of rows (i.e. no. of time incidents) +SAMP: Sampling interval [T] +Force components, NROW lines (one per time incident) +FX FY FZ MX MY MZ +FX FY FZ MX MY MZ +FX FY FZ MX MY MZ +FX FY FZ MX MY MZ +""" + return self.__forceFile + + @forceFile.setter + def forceFile(self, value: str): + """Set forceFile""" + self.__forceFile = value + @property def fx(self) -> float: """Force in X-direction""" diff --git a/src/simapy/sima/simo/externalhlaforce.py b/src/simapy/sima/simo/externalhlaforce.py deleted file mode 100644 index 50a67803..00000000 --- a/src/simapy/sima/simo/externalhlaforce.py +++ /dev/null @@ -1,245 +0,0 @@ -# This an autogenerated file -# -# Generated with ExternalHLAForce -from typing import Dict,Sequence,List -from dmt.blueprint import Blueprint -from .blueprints.externalhlaforce import ExternalHLAForceBlueprint -from typing import Dict -from ..sima import NamedObject -from ..sima import Point3 -from ..sima import ScriptableValue -from .referenceframetype import ReferenceFrameType -from .stringdoubleitem import StringDoubleItem -from .stringintitem import StringIntItem -from .stringitem import StringItem - -class ExternalHLAForce(NamedObject): - """ - Keyword arguments - ----------------- - description : str - (default "") - scriptableValues : List[ScriptableValue] - name : str - (default None) - attachmentPoint : Point3 - Attack point of force. - referenceFrame : ReferenceFrameType - Which coordinate system is the force is given in? - nStorageParameters : int - Number of parameters for intermediate storage(default 0) - intParameters : List[StringIntItem] - doubleParameters : List[StringDoubleItem] - stringParameters : List[StringItem] - importAttackPoint : bool - (default False) - fx : float - Force in X-direction(default 0.0) - fy : float - Force in Y-direction(default 0.0) - fz : float - Force in Z-direction(default 0.0) - mx : float - Moment about X-axis(default 0.0) - my : float - Moment about Y-axis(default 0.0) - mz : float - Moment about Z-axis(default 0.0) - """ - - def __init__(self , description="", referenceFrame=ReferenceFrameType.LOCAL, nStorageParameters=0, importAttackPoint=False, fx=0.0, fy=0.0, fz=0.0, mx=0.0, my=0.0, mz=0.0, **kwargs): - super().__init__(**kwargs) - self.description = description - self.scriptableValues = list() - self.name = None - self.attachmentPoint = None - self.referenceFrame = referenceFrame - self.nStorageParameters = nStorageParameters - self.intParameters = list() - self.doubleParameters = list() - self.stringParameters = list() - self.importAttackPoint = importAttackPoint - self.fx = fx - self.fy = fy - self.fz = fz - self.mx = mx - self.my = my - self.mz = mz - for key, value in kwargs.items(): - if not isinstance(value, Dict): - setattr(self, key, value) - - - @property - def blueprint(self) -> Blueprint: - """Return blueprint that this entity represents""" - return ExternalHLAForceBlueprint() - - - @property - def description(self) -> str: - """""" - return self.__description - - @description.setter - def description(self, value: str): - """Set description""" - self.__description = value - - @property - def scriptableValues(self) -> List[ScriptableValue]: - """""" - return self.__scriptableValues - - @scriptableValues.setter - def scriptableValues(self, value: List[ScriptableValue]): - """Set scriptableValues""" - if not isinstance(value, Sequence): - raise ValueError("Expected sequense, but was " , type(value)) - self.__scriptableValues = value - - @property - def name(self) -> str: - """""" - return self.__name - - @name.setter - def name(self, value: str): - """Set name""" - self.__name = value - - @property - def attachmentPoint(self) -> Point3: - """Attack point of force.""" - return self.__attachmentPoint - - @attachmentPoint.setter - def attachmentPoint(self, value: Point3): - """Set attachmentPoint""" - self.__attachmentPoint = value - - @property - def referenceFrame(self) -> ReferenceFrameType: - """Which coordinate system is the force is given in?""" - return self.__referenceFrame - - @referenceFrame.setter - def referenceFrame(self, value: ReferenceFrameType): - """Set referenceFrame""" - self.__referenceFrame = value - - @property - def nStorageParameters(self) -> int: - """Number of parameters for intermediate storage""" - return self.__nStorageParameters - - @nStorageParameters.setter - def nStorageParameters(self, value: int): - """Set nStorageParameters""" - self.__nStorageParameters = int(value) - - @property - def intParameters(self) -> List[StringIntItem]: - """""" - return self.__intParameters - - @intParameters.setter - def intParameters(self, value: List[StringIntItem]): - """Set intParameters""" - if not isinstance(value, Sequence): - raise ValueError("Expected sequense, but was " , type(value)) - self.__intParameters = value - - @property - def doubleParameters(self) -> List[StringDoubleItem]: - """""" - return self.__doubleParameters - - @doubleParameters.setter - def doubleParameters(self, value: List[StringDoubleItem]): - """Set doubleParameters""" - if not isinstance(value, Sequence): - raise ValueError("Expected sequense, but was " , type(value)) - self.__doubleParameters = value - - @property - def stringParameters(self) -> List[StringItem]: - """""" - return self.__stringParameters - - @stringParameters.setter - def stringParameters(self, value: List[StringItem]): - """Set stringParameters""" - if not isinstance(value, Sequence): - raise ValueError("Expected sequense, but was " , type(value)) - self.__stringParameters = value - - @property - def importAttackPoint(self) -> bool: - """""" - return self.__importAttackPoint - - @importAttackPoint.setter - def importAttackPoint(self, value: bool): - """Set importAttackPoint""" - self.__importAttackPoint = bool(value) - - @property - def fx(self) -> float: - """Force in X-direction""" - return self.__fx - - @fx.setter - def fx(self, value: float): - """Set fx""" - self.__fx = float(value) - - @property - def fy(self) -> float: - """Force in Y-direction""" - return self.__fy - - @fy.setter - def fy(self, value: float): - """Set fy""" - self.__fy = float(value) - - @property - def fz(self) -> float: - """Force in Z-direction""" - return self.__fz - - @fz.setter - def fz(self, value: float): - """Set fz""" - self.__fz = float(value) - - @property - def mx(self) -> float: - """Moment about X-axis""" - return self.__mx - - @mx.setter - def mx(self, value: float): - """Set mx""" - self.__mx = float(value) - - @property - def my(self) -> float: - """Moment about Y-axis""" - return self.__my - - @my.setter - def my(self, value: float): - """Set my""" - self.__my = float(value) - - @property - def mz(self) -> float: - """Moment about Z-axis""" - return self.__mz - - @mz.setter - def mz(self, value: float): - """Set mz""" - self.__mz = float(value) diff --git a/src/simapy/sima/simo/externalpythonforce.py b/src/simapy/sima/simo/externalpythonforce.py new file mode 100644 index 00000000..5f7f41f8 --- /dev/null +++ b/src/simapy/sima/simo/externalpythonforce.py @@ -0,0 +1,109 @@ +# This an autogenerated file +# +# Generated with ExternalPythonForce +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.externalpythonforce import ExternalPythonForceBlueprint +from typing import Dict +from ..sima import NamedObject +from ..sima import ScriptableValue +from ..sima import SingleValue + +class ExternalPythonForce(NamedObject): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + file : str + (default None) + className : str + Python class name contained in the python file(default '0') + parameters : List[SingleValue] + """ + + def __init__(self , description="", className='0', **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.file = None + self.className = className + self.parameters = list() + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return ExternalPythonForceBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def file(self) -> str: + """""" + return self.__file + + @file.setter + def file(self, value: str): + """Set file""" + self.__file = value + + @property + def className(self) -> str: + """Python class name contained in the python file""" + return self.__className + + @className.setter + def className(self, value: str): + """Set className""" + self.__className = value + + @property + def parameters(self) -> List[SingleValue]: + """""" + return self.__parameters + + @parameters.setter + def parameters(self, value: List[SingleValue]): + """Set parameters""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__parameters = value diff --git a/src/simapy/sima/simo/guidepoint.py b/src/simapy/sima/simo/guidepoint.py index c0ac40a3..1101df34 100644 --- a/src/simapy/sima/simo/guidepoint.py +++ b/src/simapy/sima/simo/guidepoint.py @@ -25,11 +25,11 @@ class GuidePoint(SIMOBodyPoint): tensioner : SIMOTensioner heaveCompensator : SIMOHeaveCompensator x : float - Local x position(default 0.0) + X-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) y : float - Local y position(default 0.0) + Y-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) z : float - Local z position(default 0.0) + Z-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) diameter : float Diameter of guide hole(default 0.0) normalVector : Vector3 @@ -124,7 +124,7 @@ def heaveCompensator(self, value: SIMOHeaveCompensator): @property def x(self) -> float: - """Local x position""" + """X-coordinate of attachment point in body fixed (local) coordinate system""" return self.__x @x.setter @@ -134,7 +134,7 @@ def x(self, value: float): @property def y(self) -> float: - """Local y position""" + """Y-coordinate of attachment point in body fixed (local) coordinate system""" return self.__y @y.setter @@ -144,7 +144,7 @@ def y(self, value: float): @property def z(self) -> float: - """Local z position""" + """Z-coordinate of attachment point in body fixed (local) coordinate system""" return self.__z @z.setter diff --git a/src/simapy/sima/simo/linesegment.py b/src/simapy/sima/simo/linesegment.py index a6c9253d..defbd1d2 100644 --- a/src/simapy/sima/simo/linesegment.py +++ b/src/simapy/sima/simo/linesegment.py @@ -35,7 +35,7 @@ class LineSegment(MOAO): eMod : float Modulus of elasticity(default 0.0) emFac : float - Factor of elasticity - 2 for chains - 1 for other segment types(default 1.0) + Factor of elasticity(default 1.0) transverseDrag : float Transverse drag coefficient(default 0.0) longitudinalDrag : float @@ -170,7 +170,7 @@ def eMod(self, value: float): @property def emFac(self) -> float: - """Factor of elasticity - 2 for chains - 1 for other segment types""" + """Factor of elasticity""" return self.__emFac @emFac.setter diff --git a/src/simapy/sima/simo/simobody.py b/src/simapy/sima/simo/simobody.py index 6f780fa2..910716b7 100644 --- a/src/simapy/sima/simo/simobody.py +++ b/src/simapy/sima/simo/simobody.py @@ -1,7 +1,6 @@ # This an autogenerated file # # Generated with SIMOBody -from __future__ import annotations from typing import Dict,Sequence,List from dmt.blueprint import Blueprint from .blueprints.simobody import SIMOBodyBlueprint @@ -35,11 +34,12 @@ from .bodytype import BodyType from .bumperdata import BumperData from .catenarysystem import CatenarySystem +from .controlsystem import ControlSystem from .dockingconepositioning import DockingConePositioning from .externalcontrolsystem import ExternalControlSystem from .externaldllforce import ExternalDLLForce from .externalforcefromfile import ExternalForceFromFile -from .externalhlaforce import ExternalHLAForce +from .externalpythonforce import ExternalPythonForce from .fixedbodyelement import FixedBodyElement from .fixedforceelongation import FixedForceElongation from .genericexternalcontrolsystem import GenericExternalControlSystem @@ -62,9 +62,6 @@ from .timedependentpointmass import TimeDependentPointMass from .timedependentvolumemass import TimeDependentVolumeMass from .verticalaxiswindturbine import VerticalAxisWindTurbine -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from .controlsystem import ControlSystem class SIMOBody(Body): """ @@ -121,7 +118,7 @@ class SIMOBody(Body): controlSystem : ControlSystem slenderElements : List[SlenderElement] externalDLLForces : List[ExternalDLLForce] - externalHLAForces : List[ExternalHLAForce] + externalPythonForces : List[ExternalPythonForce] externalForcesFromFile : List[ExternalForceFromFile] fixedBodyElements : List[FixedBodyElement] timeDependentPointMasses : List[TimeDependentPointMass] @@ -192,7 +189,7 @@ def __init__(self , description="", length=10.0, width=5.0, height=5.0, _type=Bo self.controlSystem = None self.slenderElements = list() self.externalDLLForces = list() - self.externalHLAForces = list() + self.externalPythonForces = list() self.externalForcesFromFile = list() self.fixedBodyElements = list() self.timeDependentPointMasses = list() @@ -658,16 +655,16 @@ def externalDLLForces(self, value: List[ExternalDLLForce]): self.__externalDLLForces = value @property - def externalHLAForces(self) -> List[ExternalHLAForce]: + def externalPythonForces(self) -> List[ExternalPythonForce]: """""" - return self.__externalHLAForces + return self.__externalPythonForces - @externalHLAForces.setter - def externalHLAForces(self, value: List[ExternalHLAForce]): - """Set externalHLAForces""" + @externalPythonForces.setter + def externalPythonForces(self, value: List[ExternalPythonForce]): + """Set externalPythonForces""" if not isinstance(value, Sequence): raise ValueError("Expected sequense, but was " , type(value)) - self.__externalHLAForces = value + self.__externalPythonForces = value @property def externalForcesFromFile(self) -> List[ExternalForceFromFile]: diff --git a/src/simapy/sima/simo/simobodypoint.py b/src/simapy/sima/simo/simobodypoint.py index df211470..8eb5bef6 100644 --- a/src/simapy/sima/simo/simobodypoint.py +++ b/src/simapy/sima/simo/simobodypoint.py @@ -25,11 +25,11 @@ class SIMOBodyPoint(NamedObject,BodyForceComponent): tensioner : SIMOTensioner heaveCompensator : SIMOHeaveCompensator x : float - Local x position(default 0.0) + X-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) y : float - Local y position(default 0.0) + Y-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) z : float - Local z position(default 0.0) + Z-coordinate of attachment point in body fixed (local) coordinate system(default 0.0) """ def __init__(self , description="", x=0.0, y=0.0, z=0.0, **kwargs): @@ -118,7 +118,7 @@ def heaveCompensator(self, value: SIMOHeaveCompensator): @property def x(self) -> float: - """Local x position""" + """X-coordinate of attachment point in body fixed (local) coordinate system""" return self.__x @x.setter @@ -128,7 +128,7 @@ def x(self, value: float): @property def y(self) -> float: - """Local y position""" + """Y-coordinate of attachment point in body fixed (local) coordinate system""" return self.__y @y.setter @@ -138,7 +138,7 @@ def y(self, value: float): @property def z(self) -> float: - """Local z position""" + """Z-coordinate of attachment point in body fixed (local) coordinate system""" return self.__z @z.setter diff --git a/src/simapy/sima/simo/simostaticcalculationparameters.py b/src/simapy/sima/simo/simostaticcalculationparameters.py index a79e50eb..67c6f777 100644 --- a/src/simapy/sima/simo/simostaticcalculationparameters.py +++ b/src/simapy/sima/simo/simostaticcalculationparameters.py @@ -11,6 +11,7 @@ from .dofelimination import DOFElimination from .equilibriumcalculationoption import EquilibriumCalculationOption from .equilibriumgriddefinition import EquilibriumGridDefinition +from .simostaticresultstorageparameters import SIMOStaticResultStorageParameters from .staticequilibriumbody import StaticEquilibriumBody class SIMOStaticCalculationParameters(MOAO): @@ -54,6 +55,7 @@ class SIMOStaticCalculationParameters(MOAO): equilibriumGridDefinition : EquilibriumGridDefinition requireSuccessfulCalculation : bool When checked, static calculation will fail if no equilibrium position is found(default True) + storageParameters : SIMOStaticResultStorageParameters """ def __init__(self , description="", runStaticAutomatically=False, calculateEquilibrium=True, maxPeriod=10.0, posTol=0.1, dirTol=0.1, timeStep=0.01, maxStep=10000, criticalDamping=True, writeVisFile=True, calculateEigenvalues=False, equilibriumCalculationMethod=EquilibriumCalculationOption.TRANSIENT, forceTolerance=100.0, momentTolerance=1000.0, multipleEquilibriumCalculations=False, requireSuccessfulCalculation=True, **kwargs): @@ -80,6 +82,7 @@ def __init__(self , description="", runStaticAutomatically=False, calculateEquil self.multipleEquilibriumCalculations = multipleEquilibriumCalculations self.equilibriumGridDefinition = None self.requireSuccessfulCalculation = requireSuccessfulCalculation + self.storageParameters = None for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -320,3 +323,13 @@ def requireSuccessfulCalculation(self) -> bool: def requireSuccessfulCalculation(self, value: bool): """Set requireSuccessfulCalculation""" self.__requireSuccessfulCalculation = bool(value) + + @property + def storageParameters(self) -> SIMOStaticResultStorageParameters: + """""" + return self.__storageParameters + + @storageParameters.setter + def storageParameters(self, value: SIMOStaticResultStorageParameters): + """Set storageParameters""" + self.__storageParameters = value diff --git a/src/simapy/sima/simo/simostaticresultstorageparameters.py b/src/simapy/sima/simo/simostaticresultstorageparameters.py new file mode 100644 index 00000000..10057de3 --- /dev/null +++ b/src/simapy/sima/simo/simostaticresultstorageparameters.py @@ -0,0 +1,68 @@ +# This an autogenerated file +# +# Generated with SIMOStaticResultStorageParameters +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.simostaticresultstorageparameters import SIMOStaticResultStorageParametersBlueprint +from typing import Dict +from ..sima import MOAO +from ..sima import ScriptableValue + +class SIMOStaticResultStorageParameters(MOAO): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + storeCatenaryLinesResults : bool + Store results for Catenary lines?(default False) + """ + + def __init__(self , description="", storeCatenaryLinesResults=False, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.storeCatenaryLinesResults = storeCatenaryLinesResults + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return SIMOStaticResultStorageParametersBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def storeCatenaryLinesResults(self) -> bool: + """Store results for Catenary lines?""" + return self.__storeCatenaryLinesResults + + @storeCatenaryLinesResults.setter + def storeCatenaryLinesResults(self, value: bool): + """Set storeCatenaryLinesResults""" + self.__storeCatenaryLinesResults = bool(value) diff --git a/src/simapy/sima/simo/simotask.py b/src/simapy/sima/simo/simotask.py index df2f73d0..decd436c 100644 --- a/src/simapy/sima/simo/simotask.py +++ b/src/simapy/sima/simo/simotask.py @@ -44,11 +44,9 @@ class SIMOTask(ConditionTask): (default True) exportMassUnit : MassUnit Used as export unit for mass ( and indirectly force) - exportAsFMU : bool - Generate FMU (Functional Mockup Unit) from model(default False) """ - def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermediateFiles=True, exportMassUnit=MassUnit.MG, exportAsFMU=False, **kwargs): + def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermediateFiles=True, exportMassUnit=MassUnit.MG, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -66,7 +64,6 @@ def __init__(self , description="", runNumber=0, simoMemory=128, removeIntermedi self.simoMemory = simoMemory self.removeIntermediateFiles = removeIntermediateFiles self.exportMassUnit = exportMassUnit - self.exportAsFMU = exportAsFMU for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -253,13 +250,3 @@ def exportMassUnit(self) -> MassUnit: def exportMassUnit(self, value: MassUnit): """Set exportMassUnit""" self.__exportMassUnit = value - - @property - def exportAsFMU(self) -> bool: - """Generate FMU (Functional Mockup Unit) from model""" - return self.__exportAsFMU - - @exportAsFMU.setter - def exportAsFMU(self, value: bool): - """Set exportAsFMU""" - self.__exportAsFMU = bool(value) diff --git a/src/simapy/sima/simo/stringdoubleitem.py b/src/simapy/sima/simo/stringdoubleitem.py index 627d2757..1923a67b 100644 --- a/src/simapy/sima/simo/stringdoubleitem.py +++ b/src/simapy/sima/simo/stringdoubleitem.py @@ -19,14 +19,17 @@ class StringDoubleItem(MOAO): (default None) value : float (default 0.0) + unit : str + (default '-') """ - def __init__(self , description="", value=0.0, **kwargs): + def __init__(self , description="", value=0.0, unit='-', **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() self.text = None self.value = value + self.unit = unit for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -79,3 +82,13 @@ def value(self) -> float: def value(self, value: float): """Set value""" self.__value = float(value) + + @property + def unit(self) -> str: + """""" + return self.__unit + + @unit.setter + def unit(self, value: str): + """Set unit""" + self.__unit = value diff --git a/src/simapy/sima/windpark/__init__.py b/src/simapy/sima/windpark/__init__.py index 9e7500f1..a470624a 100644 --- a/src/simapy/sima/windpark/__init__.py +++ b/src/simapy/sima/windpark/__init__.py @@ -1,13 +1,13 @@ from .bladeelement import BladeElement # noqa from .generator import Generator # noqa -from .performancerelation import PerformanceRelation # noqa from .performancerelationitem import PerformanceRelationItem # noqa from .turbulenceboxscaling import TurbulenceBoxScaling # noqa from .windparktask import WindParkTask # noqa from .windparkturbine import WindParkTurbine # noqa from .windturbinemotion import WindTurbineMotion # noqa from .windturbinetype import WindTurbineType # noqa +from .yawperformancerelation import YawPerformanceRelation # noqa from .areaaveragingoption import AreaAveragingOption # noqa from .deficitanalysisoption import DeficitAnalysisOption # noqa from .deficitfilecontents import DeficitFileContents # noqa diff --git a/src/simapy/sima/windpark/blueprints/generator.py b/src/simapy/sima/windpark/blueprints/generator.py index f9c317a6..50538154 100644 --- a/src/simapy/sima/windpark/blueprints/generator.py +++ b/src/simapy/sima/windpark/blueprints/generator.py @@ -68,4 +68,7 @@ def __init__(self, name="Generator", package_path="sima/windpark", description=" self.add_attribute(EnumAttribute("wakeFlowModel","sima/windpark/WakeFlowModel","")) self.add_attribute(Attribute("yawIncrement","number","Yaw misalignment increment used in deficit computation",default=0.0)) self.add_attribute(EnumAttribute("shaftDirectionDefinition","sima/windpark/ShaftDirection","Kind of shaft direction definition")) - self.add_attribute(BlueprintAttribute("windTurbineMotions","sima/windpark/WindTurbineMotion","",True,Dimension("*"))) \ No newline at end of file + self.add_attribute(BlueprintAttribute("windTurbineMotions","sima/windpark/WindTurbineMotion","",True,Dimension("*"))) + self.add_attribute(Attribute("useTimeWindow","boolean","If selected simulations will be performed for user defined start time and duration, otherwise DIWA will estimate the simulations time duration from turbulence boxes.",default=False)) + self.add_attribute(Attribute("timeWindowStart","number","Starting time of meandering",default=0.0)) + self.add_attribute(Attribute("timeWindowDuration","number","Total duration of meandering",default=0.0)) \ No newline at end of file diff --git a/src/simapy/sima/windpark/blueprints/windturbinetype.py b/src/simapy/sima/windpark/blueprints/windturbinetype.py index 5be07d64..98931e78 100644 --- a/src/simapy/sima/windpark/blueprints/windturbinetype.py +++ b/src/simapy/sima/windpark/blueprints/windturbinetype.py @@ -23,4 +23,5 @@ def __init__(self, name="WindTurbineType", package_path="sima/windpark", descrip self.add_attribute(BlueprintAttribute("bladeElements","sima/windpark/BladeElement","",True,Dimension("*"))) self.add_attribute(Attribute("cutInWindSpeed","number","",default=0.0)) self.add_attribute(Attribute("cutOutWindSpeed","number","",default=0.0)) - self.add_attribute(BlueprintAttribute("performanceRelations","sima/windpark/PerformanceRelation","",True,Dimension("*"))) \ No newline at end of file + self.add_attribute(BlueprintAttribute("yawPerformanceRelations","sima/windpark/YawPerformanceRelation","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("performanceRelations","sima/windpark/PerformanceRelationItem","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/windpark/blueprints/performancerelation.py b/src/simapy/sima/windpark/blueprints/yawperformancerelation.py similarity index 78% rename from src/simapy/sima/windpark/blueprints/performancerelation.py rename to src/simapy/sima/windpark/blueprints/yawperformancerelation.py index b1a8c410..256d2d76 100644 --- a/src/simapy/sima/windpark/blueprints/performancerelation.py +++ b/src/simapy/sima/windpark/blueprints/yawperformancerelation.py @@ -1,5 +1,5 @@ # -# Generated with PerformanceRelationBlueprint +# Generated with YawPerformanceRelationBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute @@ -7,10 +7,10 @@ from dmt.blueprint_attribute import BlueprintAttribute from ...sima.blueprints.moao import MOAOBlueprint -class PerformanceRelationBlueprint(MOAOBlueprint): +class YawPerformanceRelationBlueprint(MOAOBlueprint): """""" - def __init__(self, name="PerformanceRelation", package_path="sima/windpark", description=""): + def __init__(self, name="YawPerformanceRelation", package_path="sima/windpark", description=""): super().__init__(name,package_path,description) self.add_attribute(Attribute("description","string","",default="")) self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) diff --git a/src/simapy/sima/windpark/generator.py b/src/simapy/sima/windpark/generator.py index ba2afafe..36e7b54e 100644 --- a/src/simapy/sima/windpark/generator.py +++ b/src/simapy/sima/windpark/generator.py @@ -132,9 +132,15 @@ class Generator(Named,ConditionSelectable): shaftDirectionDefinition : ShaftDirection Kind of shaft direction definition windTurbineMotions : List[WindTurbineMotion] + useTimeWindow : bool + If selected simulations will be performed for user defined start time and duration, otherwise DIWA will estimate the simulations time duration from turbulence boxes.(default False) + timeWindowStart : float + Starting time of meandering(default 0.0) + timeWindowDuration : float + Total duration of meandering(default 0.0) """ - def __init__(self , description="", airDensity=1.3, kinematicViscosity=1.824e-05, meanderingOption=MeanderingAnalysisOption.COMP, powerOption=PowerOption.COMP, deficitOption=DeficitAnalysisOption.COMP, focusOption=Focus.TARGET, angleChange=3.0, maxLaps=30, deficitFileContents=DeficitFileContents.INDUCTION_PROFILE, ambientMixingParameter=0.0, deficitParameter=0.0, multipleDeficitMethod=MultipleDeficitMethod.MAXOP, nearWakeLengthModel=NearWakeLengthModel.ROTOR_DIAMETERS, viscosityFilter=ViscosityFilter.MADSEN, incomingWind=IncomingWind.AMBIENT, speedIncrement=0.25, deficitDepthFactor=0.6, deficitGradientFactor=0.35, cutOffFilterLengthFactor=2.0, windVelocity=0.0, windDirection=0.0, turbulenceIntencity=0.0, stabilityClass=StabilityClass.NONE, turbulenceBoxOption=TurbulenceBoxOption.DTUMANN, outputPrefix='diwa', includePowerResult=False, powerResultFormat=FileFormat.BINARY, includeVisualization=False, visualizationFormat=FileFormat.BINARY, animationTime=0.0, areaAveragingOption=AreaAveragingOption.RADIAL, filterLengthOption=FilterLengthOption.ROTOR, weightOption=WeightOption.UNIFORM, weightConst=1.0, applyLowPassFilter=True, applyAreaAveraging=False, lowPassFrequencyOption=LowPassFrequencyOption.CALC, lowPassFrequency=0.0, useYawMisalignment=False, interpolateYawMisalignment=False, wakeFlowModel=WakeFlowModel.JIMENEZ, yawIncrement=0.0, shaftDirectionDefinition=ShaftDirection.YAW, **kwargs): + def __init__(self , description="", airDensity=1.3, kinematicViscosity=1.824e-05, meanderingOption=MeanderingAnalysisOption.COMP, powerOption=PowerOption.COMP, deficitOption=DeficitAnalysisOption.COMP, focusOption=Focus.TARGET, angleChange=3.0, maxLaps=30, deficitFileContents=DeficitFileContents.INDUCTION_PROFILE, ambientMixingParameter=0.0, deficitParameter=0.0, multipleDeficitMethod=MultipleDeficitMethod.MAXOP, nearWakeLengthModel=NearWakeLengthModel.ROTOR_DIAMETERS, viscosityFilter=ViscosityFilter.MADSEN, incomingWind=IncomingWind.AMBIENT, speedIncrement=0.25, deficitDepthFactor=0.6, deficitGradientFactor=0.35, cutOffFilterLengthFactor=2.0, windVelocity=0.0, windDirection=0.0, turbulenceIntencity=0.0, stabilityClass=StabilityClass.NONE, turbulenceBoxOption=TurbulenceBoxOption.DTUMANN, outputPrefix='diwa', includePowerResult=False, powerResultFormat=FileFormat.BINARY, includeVisualization=False, visualizationFormat=FileFormat.BINARY, animationTime=0.0, areaAveragingOption=AreaAveragingOption.RADIAL, filterLengthOption=FilterLengthOption.ROTOR, weightOption=WeightOption.UNIFORM, weightConst=1.0, applyLowPassFilter=True, applyAreaAveraging=False, lowPassFrequencyOption=LowPassFrequencyOption.CALC, lowPassFrequency=0.0, useYawMisalignment=False, interpolateYawMisalignment=False, wakeFlowModel=WakeFlowModel.JIMENEZ, yawIncrement=0.0, shaftDirectionDefinition=ShaftDirection.YAW, useTimeWindow=False, timeWindowStart=0.0, timeWindowDuration=0.0, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -192,6 +198,9 @@ def __init__(self , description="", airDensity=1.3, kinematicViscosity=1.824e-05 self.yawIncrement = yawIncrement self.shaftDirectionDefinition = shaftDirectionDefinition self.windTurbineMotions = list() + self.useTimeWindow = useTimeWindow + self.timeWindowStart = timeWindowStart + self.timeWindowDuration = timeWindowDuration for key, value in kwargs.items(): if not isinstance(value, Dict): setattr(self, key, value) @@ -772,3 +781,33 @@ def windTurbineMotions(self, value: List[WindTurbineMotion]): if not isinstance(value, Sequence): raise ValueError("Expected sequense, but was " , type(value)) self.__windTurbineMotions = value + + @property + def useTimeWindow(self) -> bool: + """If selected simulations will be performed for user defined start time and duration, otherwise DIWA will estimate the simulations time duration from turbulence boxes.""" + return self.__useTimeWindow + + @useTimeWindow.setter + def useTimeWindow(self, value: bool): + """Set useTimeWindow""" + self.__useTimeWindow = bool(value) + + @property + def timeWindowStart(self) -> float: + """Starting time of meandering""" + return self.__timeWindowStart + + @timeWindowStart.setter + def timeWindowStart(self, value: float): + """Set timeWindowStart""" + self.__timeWindowStart = float(value) + + @property + def timeWindowDuration(self) -> float: + """Total duration of meandering""" + return self.__timeWindowDuration + + @timeWindowDuration.setter + def timeWindowDuration(self, value: float): + """Set timeWindowDuration""" + self.__timeWindowDuration = float(value) diff --git a/src/simapy/sima/windpark/windturbinetype.py b/src/simapy/sima/windpark/windturbinetype.py index d6faf4e7..2e9d7903 100644 --- a/src/simapy/sima/windpark/windturbinetype.py +++ b/src/simapy/sima/windpark/windturbinetype.py @@ -8,8 +8,9 @@ from ..sima import NamedObject from ..sima import ScriptableValue from .bladeelement import BladeElement -from .performancerelation import PerformanceRelation +from .performancerelationitem import PerformanceRelationItem from .turbinedirection import TurbineDirection +from .yawperformancerelation import YawPerformanceRelation class WindTurbineType(NamedObject): """ @@ -34,7 +35,8 @@ class WindTurbineType(NamedObject): (default 0.0) cutOutWindSpeed : float (default 0.0) - performanceRelations : List[PerformanceRelation] + yawPerformanceRelations : List[YawPerformanceRelation] + performanceRelations : List[PerformanceRelationItem] """ def __init__(self , description="", direction=TurbineDirection.UPWIND, outerRadius=0.0, numberOfBlades=0, turbineDirection=TurbineDirection.UPWIND, cutInWindSpeed=0.0, cutOutWindSpeed=0.0, **kwargs): @@ -50,6 +52,7 @@ def __init__(self , description="", direction=TurbineDirection.UPWIND, outerRadi self.bladeElements = list() self.cutInWindSpeed = cutInWindSpeed self.cutOutWindSpeed = cutOutWindSpeed + self.yawPerformanceRelations = list() self.performanceRelations = list() for key, value in kwargs.items(): if not isinstance(value, Dict): @@ -177,12 +180,24 @@ def cutOutWindSpeed(self, value: float): self.__cutOutWindSpeed = float(value) @property - def performanceRelations(self) -> List[PerformanceRelation]: + def yawPerformanceRelations(self) -> List[YawPerformanceRelation]: + """""" + return self.__yawPerformanceRelations + + @yawPerformanceRelations.setter + def yawPerformanceRelations(self, value: List[YawPerformanceRelation]): + """Set yawPerformanceRelations""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__yawPerformanceRelations = value + + @property + def performanceRelations(self) -> List[PerformanceRelationItem]: """""" return self.__performanceRelations @performanceRelations.setter - def performanceRelations(self, value: List[PerformanceRelation]): + def performanceRelations(self, value: List[PerformanceRelationItem]): """Set performanceRelations""" if not isinstance(value, Sequence): raise ValueError("Expected sequense, but was " , type(value)) diff --git a/src/simapy/sima/windpark/performancerelation.py b/src/simapy/sima/windpark/yawperformancerelation.py similarity index 91% rename from src/simapy/sima/windpark/performancerelation.py rename to src/simapy/sima/windpark/yawperformancerelation.py index de9fa064..ec0de845 100644 --- a/src/simapy/sima/windpark/performancerelation.py +++ b/src/simapy/sima/windpark/yawperformancerelation.py @@ -1,15 +1,15 @@ # This an autogenerated file # -# Generated with PerformanceRelation +# Generated with YawPerformanceRelation from typing import Dict,Sequence,List from dmt.blueprint import Blueprint -from .blueprints.performancerelation import PerformanceRelationBlueprint +from .blueprints.yawperformancerelation import YawPerformanceRelationBlueprint from typing import Dict from ..sima import MOAO from ..sima import ScriptableValue from .performancerelationitem import PerformanceRelationItem -class PerformanceRelation(MOAO): +class YawPerformanceRelation(MOAO): """ Keyword arguments ----------------- @@ -35,7 +35,7 @@ def __init__(self , description="", yawAngle=0.0, **kwargs): @property def blueprint(self) -> Blueprint: """Return blueprint that this entity represents""" - return PerformanceRelationBlueprint() + return YawPerformanceRelationBlueprint() @property diff --git a/src/simapy/sima/windturbine/blueprints/horizontalaxiswindturbinecontroller.py b/src/simapy/sima/windturbine/blueprints/horizontalaxiswindturbinecontroller.py index b0e14d0d..63101670 100644 --- a/src/simapy/sima/windturbine/blueprints/horizontalaxiswindturbinecontroller.py +++ b/src/simapy/sima/windturbine/blueprints/horizontalaxiswindturbinecontroller.py @@ -20,6 +20,7 @@ def __init__(self, name="HorizontalAxisWindTurbineController", package_path="sim self.add_attribute(Attribute("ratedOmega","number","Rated electrical omega",default=0.0)) self.add_attribute(Attribute("ratedTorque","number","Rated electrical torque",default=0.0)) self.add_attribute(Attribute("gearBoxRatio","number","Gear box ratio",default=0.0)) + self.add_attribute(Attribute("generatorEfficiency","number","Generator efficiency due to electrical and mechanical losses",default=1.0)) self.add_attribute(Attribute("maxPitchRate","number","Maximum pitch rate",default=0.0)) self.add_attribute(Attribute("maxPitch","number","Maximum pitch",default=0.0)) self.add_attribute(Attribute("maxTorqueRate","number","Maximum torque rate",default=0.0)) diff --git a/src/simapy/sima/windturbine/horizontalaxiswindturbinecontroller.py b/src/simapy/sima/windturbine/horizontalaxiswindturbinecontroller.py index 99649bb3..f748f204 100644 --- a/src/simapy/sima/windturbine/horizontalaxiswindturbinecontroller.py +++ b/src/simapy/sima/windturbine/horizontalaxiswindturbinecontroller.py @@ -32,6 +32,8 @@ class HorizontalAxisWindTurbineController(MOAO): Rated electrical torque(default 0.0) gearBoxRatio : float Gear box ratio(default 0.0) + generatorEfficiency : float + Generator efficiency due to electrical and mechanical losses(default 1.0) maxPitchRate : float Maximum pitch rate(default 0.0) maxPitch : float @@ -73,7 +75,7 @@ class HorizontalAxisWindTurbineController(MOAO): Log of signals to and from controller are written to a log file. The file .log is stored in the analysis folder. This option should be used for debugging purposes only. Avaliable for external controller only.(default False) """ - def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega=0.0, ratedTorque=0.0, gearBoxRatio=0.0, maxPitchRate=0.0, maxPitch=0.0, maxTorqueRate=0.0, maxTorque=0.0, gainScheduling=TableFormat.DEFAULT, external=False, reg3MinPitch=0.0, transitionalSpeed15=0.0, transitionalSpeed20=0.0, transitionalSpeed25=0.0, transitionalSpeed30=0.0, reg2Torque=0.0, powerExtraction=PowerExtraction.POWER, minPitch=0.0, sampleInterval=0.0, controllerType=ControllerType.JAR_FILE_CONTROLLER, logFile=False, **kwargs): + def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega=0.0, ratedTorque=0.0, gearBoxRatio=0.0, generatorEfficiency=1.0, maxPitchRate=0.0, maxPitch=0.0, maxTorqueRate=0.0, maxTorque=0.0, gainScheduling=TableFormat.DEFAULT, external=False, reg3MinPitch=0.0, transitionalSpeed15=0.0, transitionalSpeed20=0.0, transitionalSpeed25=0.0, transitionalSpeed30=0.0, reg2Torque=0.0, powerExtraction=PowerExtraction.POWER, minPitch=0.0, sampleInterval=0.0, controllerType=ControllerType.JAR_FILE_CONTROLLER, logFile=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -83,6 +85,7 @@ def __init__(self , description="", kp=0.0, ki=0.0, filterPeriod=0.0, ratedOmega self.ratedOmega = ratedOmega self.ratedTorque = ratedTorque self.gearBoxRatio = gearBoxRatio + self.generatorEfficiency = generatorEfficiency self.maxPitchRate = maxPitchRate self.maxPitch = maxPitch self.maxTorqueRate = maxTorqueRate @@ -198,6 +201,16 @@ def gearBoxRatio(self, value: float): """Set gearBoxRatio""" self.__gearBoxRatio = float(value) + @property + def generatorEfficiency(self) -> float: + """Generator efficiency due to electrical and mechanical losses""" + return self.__generatorEfficiency + + @generatorEfficiency.setter + def generatorEfficiency(self, value: float): + """Set generatorEfficiency""" + self.__generatorEfficiency = float(value) + @property def maxPitchRate(self) -> float: """Maximum pitch rate""" diff --git a/src/simapy/sima/workflow/__init__.py b/src/simapy/sima/workflow/__init__.py index d79882be..c82e8cc8 100644 --- a/src/simapy/sima/workflow/__init__.py +++ b/src/simapy/sima/workflow/__init__.py @@ -28,6 +28,7 @@ from .postprocessornode import PostProcessorNode # noqa from .postprocessoroperationnode import PostProcessorOperationNode # noqa from .postprocessoroutputslot import PostprocessorOutputSlot # noqa +from .pythonprogramnode import PythonProgramNode # noqa from .realnumberinput import RealNumberInput # noqa from .reportfragmentinputslot import ReportFragmentInputSlot # noqa from .reportfragmentitem import ReportFragmentItem # noqa diff --git a/src/simapy/sima/workflow/blueprints/fileoutputnode.py b/src/simapy/sima/workflow/blueprints/fileoutputnode.py index df902294..64727f1a 100644 --- a/src/simapy/sima/workflow/blueprints/fileoutputnode.py +++ b/src/simapy/sima/workflow/blueprints/fileoutputnode.py @@ -32,4 +32,5 @@ def __init__(self, name="FileOutputNode", package_path="sima/workflow", descript self.add_attribute(Attribute("specifyAdditionalProperties","boolean","Specify additional properties in the file root",default=False)) self.add_attribute(Attribute("writeRawText","boolean","Writes a single input string into the given file",default=False)) self.add_attribute(Attribute("indent","boolean","Indent the output text",default=False)) + self.add_attribute(Attribute("directModelExport","boolean","Drop the extra signal layer If a model is encountered in the output",default=False)) self.add_attribute(BlueprintAttribute("outputSlot","sima/post/OutputSlot","",True)) \ No newline at end of file diff --git a/src/simapy/sima/workflow/blueprints/pythonprogramnode.py b/src/simapy/sima/workflow/blueprints/pythonprogramnode.py new file mode 100644 index 00000000..75bc9c19 --- /dev/null +++ b/src/simapy/sima/workflow/blueprints/pythonprogramnode.py @@ -0,0 +1,26 @@ +# +# Generated with PythonProgramNodeBlueprint +from dmt.blueprint import Blueprint +from dmt.dimension import Dimension +from dmt.attribute import Attribute +from dmt.enum_attribute import EnumAttribute +from dmt.blueprint_attribute import BlueprintAttribute +from ...post.blueprints.runnode import RunNodeBlueprint + +class PythonProgramNodeBlueprint(RunNodeBlueprint): + """""" + + def __init__(self, name="PythonProgramNode", package_path="sima/workflow", description=""): + super().__init__(name,package_path,description) + self.add_attribute(Attribute("description","string","",default="")) + self.add_attribute(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*"))) + self.add_attribute(Attribute("name","string","")) + self.add_attribute(Attribute("x","integer","",default=0)) + self.add_attribute(Attribute("y","integer","",default=0)) + self.add_attribute(Attribute("h","integer","",default=0)) + self.add_attribute(Attribute("w","integer","",default=0)) + self.add_attribute(BlueprintAttribute("controlSignalInputSlots","sima/post/ControlSignalInputSlot","",True,Dimension("*"))) + self.add_attribute(Attribute("file","string","Python program to run",optional=False)) + self.add_attribute(BlueprintAttribute("fileInputSlots","sima/workflow/FileInputSlot","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("fileOutputSlots","sima/workflow/FileOutputSlot","",True,Dimension("*"))) + self.add_attribute(BlueprintAttribute("parameters","sima/sima/SingleValue","",True,Dimension("*"))) \ No newline at end of file diff --git a/src/simapy/sima/workflow/blueprints/reportfragmentnode.py b/src/simapy/sima/workflow/blueprints/reportfragmentnode.py index 306a6e96..5e914b50 100644 --- a/src/simapy/sima/workflow/blueprints/reportfragmentnode.py +++ b/src/simapy/sima/workflow/blueprints/reportfragmentnode.py @@ -5,10 +5,10 @@ from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute -from ...report.blueprints.reportfragmentreference import ReportFragmentReferenceBlueprint from ...post.blueprints.runnode import RunNodeBlueprint +from ...report.blueprints.reportfragmentreference import ReportFragmentReferenceBlueprint -class ReportFragmentNodeBlueprint(ReportFragmentReferenceBlueprint,RunNodeBlueprint): +class ReportFragmentNodeBlueprint(RunNodeBlueprint,ReportFragmentReferenceBlueprint): """""" def __init__(self, name="ReportFragmentNode", package_path="sima/workflow", description=""): diff --git a/src/simapy/sima/workflow/fileoutputnode.py b/src/simapy/sima/workflow/fileoutputnode.py index 577c256d..d4940db2 100644 --- a/src/simapy/sima/workflow/fileoutputnode.py +++ b/src/simapy/sima/workflow/fileoutputnode.py @@ -53,10 +53,12 @@ class FileOutputNode(OutputNode,SignalPropertiesContainer): Writes a single input string into the given file(default False) indent : bool Indent the output text(default False) + directModelExport : bool + Drop the extra signal layer If a model is encountered in the output(default False) outputSlot : OutputSlot """ - def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CSV, addMetaTags=False, decimalSeparator=DecimalSeparator.PERIOD, skipHeader=False, specifyAdditionalProperties=False, writeRawText=False, indent=False, **kwargs): + def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CSV, addMetaTags=False, decimalSeparator=DecimalSeparator.PERIOD, skipHeader=False, specifyAdditionalProperties=False, writeRawText=False, indent=False, directModelExport=False, **kwargs): super().__init__(**kwargs) self.description = description self.scriptableValues = list() @@ -77,6 +79,7 @@ def __init__(self , description="", x=0, y=0, h=0, w=0, fileFormat=FileFormat.CS self.specifyAdditionalProperties = specifyAdditionalProperties self.writeRawText = writeRawText self.indent = indent + self.directModelExport = directModelExport self.outputSlot = None for key, value in kwargs.items(): if not isinstance(value, Dict): @@ -286,6 +289,16 @@ def indent(self, value: bool): """Set indent""" self.__indent = bool(value) + @property + def directModelExport(self) -> bool: + """Drop the extra signal layer If a model is encountered in the output""" + return self.__directModelExport + + @directModelExport.setter + def directModelExport(self, value: bool): + """Set directModelExport""" + self.__directModelExport = bool(value) + @property def outputSlot(self) -> OutputSlot: """""" diff --git a/src/simapy/sima/workflow/pythonprogramnode.py b/src/simapy/sima/workflow/pythonprogramnode.py new file mode 100644 index 00000000..dd37a853 --- /dev/null +++ b/src/simapy/sima/workflow/pythonprogramnode.py @@ -0,0 +1,193 @@ +# This an autogenerated file +# +# Generated with PythonProgramNode +from typing import Dict,Sequence,List +from dmt.blueprint import Blueprint +from .blueprints.pythonprogramnode import PythonProgramNodeBlueprint +from typing import Dict +from ..post import ControlSignalInputSlot +from ..post import RunNode +from ..sima import ScriptableValue +from ..sima import SingleValue +from .fileinputslot import FileInputSlot +from .fileoutputslot import FileOutputSlot + +class PythonProgramNode(RunNode): + """ + Keyword arguments + ----------------- + description : str + (default "") + scriptableValues : List[ScriptableValue] + name : str + (default None) + x : int + (default 0) + y : int + (default 0) + h : int + (default 0) + w : int + (default 0) + controlSignalInputSlots : List[ControlSignalInputSlot] + file : str + Python program to run(default None) + fileInputSlots : List[FileInputSlot] + fileOutputSlots : List[FileOutputSlot] + parameters : List[SingleValue] + """ + + def __init__(self , description="", x=0, y=0, h=0, w=0, **kwargs): + super().__init__(**kwargs) + self.description = description + self.scriptableValues = list() + self.name = None + self.x = x + self.y = y + self.h = h + self.w = w + self.controlSignalInputSlots = list() + self.file = None + self.fileInputSlots = list() + self.fileOutputSlots = list() + self.parameters = list() + for key, value in kwargs.items(): + if not isinstance(value, Dict): + setattr(self, key, value) + + + @property + def blueprint(self) -> Blueprint: + """Return blueprint that this entity represents""" + return PythonProgramNodeBlueprint() + + + @property + def description(self) -> str: + """""" + return self.__description + + @description.setter + def description(self, value: str): + """Set description""" + self.__description = value + + @property + def scriptableValues(self) -> List[ScriptableValue]: + """""" + return self.__scriptableValues + + @scriptableValues.setter + def scriptableValues(self, value: List[ScriptableValue]): + """Set scriptableValues""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__scriptableValues = value + + @property + def name(self) -> str: + """""" + return self.__name + + @name.setter + def name(self, value: str): + """Set name""" + self.__name = value + + @property + def x(self) -> int: + """""" + return self.__x + + @x.setter + def x(self, value: int): + """Set x""" + self.__x = int(value) + + @property + def y(self) -> int: + """""" + return self.__y + + @y.setter + def y(self, value: int): + """Set y""" + self.__y = int(value) + + @property + def h(self) -> int: + """""" + return self.__h + + @h.setter + def h(self, value: int): + """Set h""" + self.__h = int(value) + + @property + def w(self) -> int: + """""" + return self.__w + + @w.setter + def w(self, value: int): + """Set w""" + self.__w = int(value) + + @property + def controlSignalInputSlots(self) -> List[ControlSignalInputSlot]: + """""" + return self.__controlSignalInputSlots + + @controlSignalInputSlots.setter + def controlSignalInputSlots(self, value: List[ControlSignalInputSlot]): + """Set controlSignalInputSlots""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__controlSignalInputSlots = value + + @property + def file(self) -> str: + """Python program to run""" + return self.__file + + @file.setter + def file(self, value: str): + """Set file""" + self.__file = value + + @property + def fileInputSlots(self) -> List[FileInputSlot]: + """""" + return self.__fileInputSlots + + @fileInputSlots.setter + def fileInputSlots(self, value: List[FileInputSlot]): + """Set fileInputSlots""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__fileInputSlots = value + + @property + def fileOutputSlots(self) -> List[FileOutputSlot]: + """""" + return self.__fileOutputSlots + + @fileOutputSlots.setter + def fileOutputSlots(self, value: List[FileOutputSlot]): + """Set fileOutputSlots""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__fileOutputSlots = value + + @property + def parameters(self) -> List[SingleValue]: + """""" + return self.__parameters + + @parameters.setter + def parameters(self, value: List[SingleValue]): + """Set parameters""" + if not isinstance(value, Sequence): + raise ValueError("Expected sequense, but was " , type(value)) + self.__parameters = value diff --git a/src/simapy/sima/workflow/reportfragmentnode.py b/src/simapy/sima/workflow/reportfragmentnode.py index 5af4e059..e27fd601 100644 --- a/src/simapy/sima/workflow/reportfragmentnode.py +++ b/src/simapy/sima/workflow/reportfragmentnode.py @@ -12,7 +12,7 @@ from ..sima import ScriptableValue from .reportfragmentitemcontainer import ReportFragmentItemContainer -class ReportFragmentNode(ReportFragmentReference,RunNode): +class ReportFragmentNode(RunNode,ReportFragmentReference): """ Keyword arguments -----------------