Skip to main content

asva

Python Versions PyPI version Downloads Documentation Status

質点系による振動解析プログラム

概要

asva は Python による質点系の振動解析プログラムです。現在、次のような機能が実装されています。

  • 固有値解析
  • 地震応答解析
  • 応答倍率計算 etc.

ドキュメント

詳しくはドキュメントを確認してください。

必要なもの

  • Python3.8+

使い方

インストールとインポート

・pypiからインストールして使う場合

pip install asva
import asva as ap

・asvaのコードを直接修正しながら使う場合

以下のようにrequirements.txtをインストールした上で、asvaをフォルダを任意の場所に配置

pip install -r path/to/asva/requirements.txt
import path.to.asva as ap

コード例

import asva as ap

config: ap.AnalysisConfigType = {
    # analysis
    'BETA': 1 / 4,

    # case
    'CASES': [
        {
            'NAME': 'Example',
            'WAVE': 'Sample',
            'AMP': 1,
            'DAMPER': 'None',
            'NDIV': 2,
            'START_TIME': 0,
            'END_TIME': None,
        },
    ],

    # damper
    'DAMPERS': {
        'None': [
            [],
        ],
    },

    # model
    'BASE_ISOLATION': False,
    'H': 0.02,
    'H_TYPE': 0,
    'I': [
        [1],
    ],
    'MI': [100],
    'KI': [
        [{
            'n1': 0,
            'n2': 1,
            'type': 'elastic',
            'k0': 4000,
        }, ],
    ],

    # wave
    'WAVES': {
        'Sample': {
            'NAME': 'Sample',
            'DT': 0.02,
            'NDATA': 2688,
            'TO_METER': 0.01,
            'INPUT_FILE': 'wave/Sample.csv',
            'DELIMITER': None,
            'SKIPROWS': 3,
            'COL': 0,
            'ENCORDING': 'utf',
        },
    },
}


def main():
    analysis = ap.Analysis(config, 0)   # 0は最初のケースを回す。
    analysis.analysis()
    print(analysis.resp.dis)

if __name__ == '__main__':
    main()

Config の設定

Config では、解析モデルや解析方法、出力設定を Dict で指定します。 設定方法は以下の通りです。 詳細なタイプの確認はTypesを確認してください。

class AnalysisConfigType(TypedDict):
    # analysis
    BETA: float                 # Newmarkβ法のβ
    BASE_ISOLATION: bool        # 剛性比例型の減衰計算で1層目を無視(C1を0)

    # wave
    WAVES: Dict[str, WaveType]   # 地震波の設定

    # case
    CASES: List[CASESType]        # 解析ケースのリスト

    # model
    H: float                    # 主系粘性減衰定数
    H_TYPE: Literal[0, 1]       # 0: 初期剛性比例型 1: 瞬間合成比例型
    I: List[List[float]]        # インプットする外力(NDOF×1)の行列で指定。地震波入力の場合、通常全て1。
    MI: List[float]             # 主系の質量[ton]
    KI: List[KIType]            # 主系の剛性[kN/m]

    # damper
    DAMPERS: Dict[str, List[List[DamperType]]]
                                # ダンパーのリスト

履歴則

現在以下の履歴則が組み込まれています。

名称 タイプキー 備考
弾性 elastic
バイリニア bilinear
トリリニア trilinear
逆行型 gyakko
武田モデル takeda

ダンパー

現在以下のダンパーが組み込まれています。

名称 タイプキー 時刻歴計算 応答倍率計算 備考
質量ダンパー MASS ○ ○ 層間加速度に比例する要素
ストッパー Stopper ○ ×
粘性ダンパー(CV^α) VDA ○ ○
粘性ダンパー(バイリニア) VDB ○ ○
TMD TMD ○ ○
iRDT iRDT ○ ○

ご使用にあたって

asva は開発中のため、間違っている場合や不正確な場合があります。何かありましたらissuesにお知らせください。

Metadata

Release files for asva 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asva 0.3.1
File Size Uploaded Provenance
asva-0.3.1.tar.gz 30.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asva 0.3.1
File Interpreter ABI Platform
asva-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 100.0 kB

Release files / asva-0.3.1.tar.gz

Download URL asva-0.3.1.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be0859618dce1a322f1269dded19743a65288bf224b93658caac0b452be201c0
BLAKE2b-256 checksum
How to use checksums
f48c23c3447fa86b4db7a50da60838c6ed8836f8d9177c9f9042654277043647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release files / asva-0.3.1-py3-none-any.whl

Download URL asva-0.3.1-py3-none-any.whl
Size 70.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae90dedfa297598db4af343d4bc1def473a5783209d3da55c638571f930f36a2
BLAKE2b-256 checksum
How to use checksums
4ad172abef99a9f6a7c6f4e522d66f4de7fbda82ceda990bfb16a0917bbed944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Security for asva 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page