Skip to content

Commit

Permalink
SIMA 4.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lassebje committed Aug 27, 2024
1 parent 7991d94 commit c7e4c40
Show file tree
Hide file tree
Showing 174 changed files with 3,157 additions and 900 deletions.
124 changes: 123 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## [4.6.0] - 2023-06-09
## [4.6.0]

### Added

Expand All @@ -20,3 +20,125 @@ All notable changes to this project will be documented in this file.

- Fixed copy of cross references. Possibility to remove or keep (default) uncontained cross references when copying

## [4.8.0]

Model changes per package:

### Package riflex

Added:
- Class BottomContactStorage
- Enum ConstructionType
- Class GeneralCrossSectionStiffnessDamping
- Class ChainCrossSection
- Class DoubleSymmetricStiffnessDamping
- Class BottomContactForceStorage
- Class TouchDownPointStorage
- Enum SteelGrade
- Field WindTurbine.skewedWake
- Field WindTurbine.skewedWakeFactor
- Field HorizontalAxisController.generatorEfficiency
- Field RIFLEXDynamicCalculationParameters.bottomContactStorage

Changed:
- Field DoubleSymmetricStiffnessDamping.bendingFactor renamed to bendingFactorY
- Field GeneralCrossSectionStiffnessDamping.bendingFactor renamed to bendingFactorV
- Field GeotechnicalSpring.strainVelocityExponent renamed to velocityExponent
- Field ForceResponseStorage.storeBottomContactForces moved to BottomContactStorage

Removed:
- Field GeneralCrossSectionStiffnessDamping.option
- Field GeotechnicalSpring.relativeLength
- Field VonMisesCombinedLoading.percentile
- Field DNV_OS_F201CombinedLoading.percentile
- Field ISO_13628_7CombinedLoading.percentile
- Field RIFLEXTask.exportAsFMU


### Package simo

Added:
- Class ExternalPythonForce
- Class BallastTankPressureMeasurement
- Class SIMOStaticResultStorageParameters
- Field SIMOStaticCalculationParameters.storageParameters
- Field StringDoubleItem.unit
- Field BallastTank.pressureMeasurements
- Field SIMOBody.externalPythonForces

Removed:
- Class ExternalHLAForce
- Field ExternalDLLForce.body
- Field ExternalForceFromFile.body
- Field CatenaryLine.xwinch
- Field SIMOTask.exportAsFMU
- Field SIMOBody.externalHLAForces

### Package windturbine

Added:
- Field HorizontalAxisWindTurbineController.generatorEfficiency

### Package environment

Added:
- Field NumericalWave.file
- Field NumericalWave.fromFile
- Field ESDUWind.profileExponent


### Package sima

Added:
- Class StringValue
- Class IntValue
- Class ValueRoot
- Class SingleValue
- Class NumberValue
- Class CSVResult
- Class Value
- Class ValueContainer
- Enum literal LengthUnit.MILLIMETER

Removed
- Class MOAOFolder
- Field ScriptingPreference.showScripts

### Package command

Added:
- Field ExportBlueprintCommand.delete

Removed:
- Field ExportBlueprintCommand.versions


### Package workflow

Added:
- Class PythonProgramNode
- Field FileOutputNode.directModelExport

### Package post

Added:
- Class SignalFilterSetup
- Class OutputPlot
- Enum Filtering
- Field FileOutput.directModelExport


### Package report

Added:
- Class SectionContent

Removed:

- Class Formula
- Class Linkable
- Field Table.autoSplit
- Field Plot.mergeSeries
- Field Section.identifier
- Field Appendix.identifier
- Field Linkable.identifier
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
self.add_attribute(Attribute("delete","boolean","Delete the content of the output folder before exporting",default=False))
24 changes: 12 additions & 12 deletions src/simapy/sima/command/exportblueprintcommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/simapy/sima/environment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/simapy/sima/environment/blueprints/esduwind.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
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))
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#
# Generated with NPDWindBlueprint
# Generated with ISO199011WindBlueprint
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 .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("*")))
Expand Down
4 changes: 3 additions & 1 deletion src/simapy/sima/environment/blueprints/numericalwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
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"))
38 changes: 26 additions & 12 deletions src/simapy/sima/environment/esduwind.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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
-----------------
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit c7e4c40

Please sign in to comment.