tr-tbdy
English summary. tr-tbdy computes the seismic design spectra of the Turkish Building
Earthquake Code 2018 (TBDY 2018, Chapter 2) from the map spectral accelerations S_S and S_1
of a site and its local soil class: site coefficients F_S and F_1, S_DS, S_D1, corner periods,
the horizontal, vertical and displacement elastic spectra, the earthquake design class (DTS),
the building height class (BYS) and the reduced design spectrum. It is pure Python with no
required dependencies, exports CSV/JSON and ships a Turkish command-line tool; documentation
below is in Turkish.
Türkiye Bina Deprem Yönetmeliği 2018 (TBDY 2018) Bölüm 2 tasarım spektrumları.
Bir saha için AFAD Türkiye Deprem Tehlike Haritası'ndan okunan harita spektral ivme
katsayıları SS ve S1 ile yerel zemin sınıfı (ZA–ZE) verildiğinde tr-tbdy şunları hesaplar:
- Yerel zemin etki katsayıları FS ve F1 (Tablo 2.1, 2.2; sütunlar arasında doğrusal enterpolasyon),
- Tasarım spektral ivme katsayıları SDS, SD1 (Denk. 2.1),
- Köşe periyotları TA, TB ve TL = 6 s (Denk. 2.3),
- Yatay elastik tasarım spektrumu Sae(T) (Denk. 2.2),
- Yatay elastik tasarım yerdeğiştirme spektrumu Sde(T) (Denk. 2.4),
- Düşey elastik tasarım spektrumu SaeD(T), TAD, TBD, TLD (Denk. 2.5, 2.6),
- Bina Önem Katsayısı I ve Bina Kullanım Sınıfı BKS (Tablo 3.1),
- Deprem Tasarım Sınıfı DTS (Tablo 3.2),
- Bina Yükseklik Sınıfı BYS ve yükseklik aralıkları (Tablo 3.3),
- İsteğe bağlı: Deprem Yükü Azaltma Katsayısı Ra(T) (Denk. 4.1), azaltılmış tasarım spektrumu SaR(T) (Denk. 4.8), taban kesme kuvveti alt sınırı 0.04 I SDS (Denk. 4.19) ve Tablo 4.1'deki yerinde dökme betonarme sistemlerin (A11–A33) R ve D katsayıları.
Sonuçlar CSV/JSON olarak kaydedilir; matplotlib kuruluysa PNG grafik çizilir.
pip install tr-tbdy # yalnızca standart kütüphane
pip install "tr-tbdy[plot]" # + PNG grafik (matplotlib)
Python 3.9 veya üstü gerekir.
SS ve S1 değerlerini kullanıcı sağlar (https://tdth.afad.gov.tr/). Paket AFAD servislerine bağlanmaz, ağ erişimi yapmaz.
Hızlı başlangıç
from tr_tbdy import DesignSpectrum, Reduction, height_class, to_csv
sp = DesignSpectrum.from_map(ss=1.20, s1=0.35, soil_class="ZC") # DD-2 düzeyi
sp.fs, sp.f1 # (1.2, 1.5)
sp.sds, sp.sd1 # (1.44, 0.525)
sp.ta, sp.tb, sp.tl # (0.0729, 0.3646, 6.0)
sp.sae(1.0) # 0.525 g yatay elastik spektral ivme
sp.saed(0.1) # 1.152 g düşey elastik spektral ivme
sp.sde(1.0) # 0.1305 m elastik spektral yerdeğiştirme
sp.sae([0.0, 0.2, 2.0]) # liste de verilebilir
dts = sp.design_class(bks=3) # '1'
height_class(30.0, dts) # 4 (28 < HN <= 42)
red = Reduction.from_system("A11", bks=3) # R = 8, D = 3, I = 1.0
sp.sar(1.0, red) # 0.0656 g azaltılmış tasarım spektral ivmesi
to_csv(sp, "spektrum.csv", reduction=red) # T, Sae, SaeD, Sde, Ra, SaR
ZF sınıfı zeminlerde tablo değeri yoktur; sahaya özel zemin davranış analizinden elde edilen SDS ve SD1 ile spektrum kurulur:
sp = DesignSpectrum.from_design_coefficients(sds=1.10, sd1=0.60, soil_class="ZF")
Komut satırı
tr-tbdy spektrum --ss 1.2 --s1 0.35 --zemin ZC --bks 3 --sistem A11 \
--csv spektrum.csv --json spektrum.json --png spektrum.png
tr-tbdy katsayi --ss 0.875 --s1 0.25 --zemin ZD # FS = 1.15, F1 = 2.10
tr-tbdy bys --hn 30 --sds 0.62 --bks 1 # DTS = 2a, BYS = 4
tr-tbdy zemin --vs30 420 # ZC
tr-tbdy sistemler # Tablo 4.1 (A grubu), BKS
tr-tbdy spektrum --sds 1.1 --sd1 0.6 --zemin ZF # sahaya özel SDS/SD1
spektrum komutu özet değerleri ve periyot tablosunu (--adim, --tmax) yazdırır.
Diğer seçenekler: --duzey DD-1..DD-4, --tutucu (enterpolasyon yerine iki komşu sütunun
büyüğü), --R / --D (Tablo 4.1 dışındaki sistemler için), --pga / --pgv (yalnızca
raporlama), --sessiz. python -m tr_tbdy de aynı şekilde çalışır.
Örnek çıktı (kısaltılmış):
SS = 1.200 S1 = 0.350
FS = 1.200 F1 = 1.500 (Tablo 2.1, 2.2)
SDS = 1.4400 SD1 = 0.5250 (Denk. 2.1)
TA = 0.0729 s TB = 0.3646 s TL = 6.0 s (Denk. 2.3)
BKS = 3 I = 1 DTS = 1 (Tablo 3.1, 3.2)
T [s] Sae [g] SaeD [g] Sde [m] Ra SaR [g]
0.0000 0.5760 0.4608 0.0000 3.000 0.1920
0.3646 1.4400 0.3840 0.0476 8.000 0.1800
1.0000 0.5250 0.1400 0.1305 8.000 0.0656
API özeti
| Nesne | Açıklama |
|---|---|
DesignSpectrum.from_map(ss, s1, soil_class, level="DD-2", method="linear") |
Harita katsayılarından spektrum |
DesignSpectrum.from_design_coefficients(sds, sd1) |
SDS/SD1 biliniyorsa (ör. ZF) |
.sds, .sd1, .fs, .f1, .ta, .tb, .tl, .tad, .tbd, .tld |
Katsayılar, köşe periyotları |
.sae(T), .saed(T), .sde(T), .sar(T, reduction) |
Spektrum ordinatları (sayı veya liste) |
.design_class(bks), .periods(), .table(), .summary() |
DTS, periyot ızgarası, tablo |
site_coefficients(ss, s1, soil), short_period_coefficient, one_second_coefficient |
FS, F1 |
design_class(sds, bks), importance_factor(bks) |
Tablo 3.1, 3.2 |
height_class(hn, dts), height_class_limits(dts), height_class_table() |
Tablo 3.3 |
Reduction(R, D, I), Reduction.from_system("A11", bks), reduction_factor(...) |
Denk. 4.1 |
minimum_base_shear_ratio(sds, I) |
Denk. 4.19 alt sınırı |
soil_class_from_vs30(vs30) |
Tablo 16.1 (yalnızca Vs30) |
to_csv, to_json, spectrum_to_dict, tr_tbdy.plot.plot_spectrum |
Dışa aktarma, grafik |
TBDYError, SiteSpecificAnalysisRequired |
Hatalar (ValueError alt sınıfları) |
Tablolar tr_tbdy.tables modülündedir (FS_TABLE, F1_TABLE, BYS_UPPER_LIMITS,
STRUCTURAL_SYSTEMS, ...). fs_table= / f1_table= parametreleriyle kendi tablonuzu
verebilirsiniz (ör. yönetmelik değişikliği).
Yöntem ve kaynaklar
Tüm tablo değerleri ve denklemler, Türkiye Bina Deprem Yönetmeliği, Resmî Gazete
18.03.2018, Sayı 30364 (Mükerrer), ek PDF metni (20180318M1-2-1.pdf) ile karşılaştırılarak
doğrulanmıştır:
- 2.3.2.2, Denk. (2.1): SDS = SS · FS, SD1 = S1 · F1.
- 2.3.3.1, Tablo 2.1 / 2.2: FS (SS ≤ 0.25 … ≥ 1.50) ve F1 (S1 ≤ 0.10 … ≥ 0.60). "Tablolarda harita spektral ivme katsayılarının ara değerleri için doğrusal enterpolasyon yapılabilir." İlk sütunun altı ilk sütun, son sütunun üstü son sütun değerini alır.
- 2.3.4.1, Denk. (2.2), (2.3): Sae = (0.4 + 0.6 T/TA) SDS (0 ≤ T ≤ TA); SDS (TA ≤ T ≤ TB); SD1/T (TB ≤ T ≤ TL); SD1 TL/T² (T ≥ TL); TA = 0.2 SD1/SDS, TB = SD1/SDS, TL = 6 s.
- 2.3.4.2, Denk. (2.4): Sde(T) = T²/(4π²) · g · Sae(T), g = 9.81 m/s².
- 2.3.5, Denk. (2.5), (2.6): SaeD = (0.32 + 0.48 T/TAD) SDS; 0.8 SDS; 0.8 SDS TBD/T
(TBD ≤ T ≤ TLD); TAD = TA/3, TBD = TB/3, TLD = TL/2. TLD'den sonra tanımlı değildir
(kütüphane
nan, tablolar boş değer döndürür). - Tablo 3.1: I = 1.5 / 1.2 / 1.0 (BKS 1 / 2 / 3).
- Tablo 3.2: SDS < 0.33 → DTS 4(a); 0.33 ≤ SDS < 0.50 → 3(a); 0.50 ≤ SDS < 0.75 → 2(a); SDS ≥ 0.75 → 1(a); "a" BKS = 1 için. SDS, DD-2 düzeyindeki değerdir.
- Tablo 3.3: BYS 1–8 yükseklik aralıkları; DTS 3/3a ve 4/4a sütunları BYS 4–8 için ortaktır (birleştirilmiş hücreler).
- 4.2.1.2, Denk. (4.1): Ra = R/I (T > TB); Ra = D + (R/I − D) T/TB (T ≤ TB). 4.4.1, Denk. (4.8): SaR = Sae/Ra. Denk. (4.19): VtE ≥ 0.04 mt I SDS g.
- Tablo 4.1: A11–A33 yerinde dökme betonarme sistemlerin R, D ve izin verilen BYS değerleri.
- Tablo 16.1: Vs30 aralıkları (ZA > 1500, ZB 760–1500, ZC 360–760, ZD 180–360, ZE < 180 m/s).
Testler, bu formüllerle elle hesaplanmış örnekleri (ör. SS = 1.20, S1 = 0.35, ZC → SDS = 1.44, SD1 = 0.525, TB = 0.3646 s; SS = 0.875, S1 = 0.25, ZD → FS = 1.15, F1 = 2.10) ve tabloların yönetmelik metninden bağımsız olarak aktarılmış kopyalarını kullanır.
Sınırlamalar
- ZF zeminler için tablo yoktur: TBDY 2018 2.3.3.2 ve 16.5 uyarınca sahaya özel zemin
davranış analizi gerekir;
from_map(..., "ZF")SiteSpecificAnalysisRequiredhatası verir. - Sahaya özel spektrumlar (2.4) hesaplanmaz; bu spektrumlar standart spektrumun %90'ından küçük olamaz (2.4.1.2).
soil_class_from_vs30yalnızca Vs30'u kullanır. Tablo 16.1 sınır değerlerinin hangi sınıfa ait olduğunu belirtmez; kütüphane ASCE 7 ile aynı kuralı varsayar (760 → ZC, 360 → ZD, 180 → ZD, 1500 → ZB). SPT N60 ve cu ölçütleri, ZE'nin yumuşak kil koşulu ve ZF ölçütleri değerlendirilmez.--tutucu/method="conservative"yönetmelikte tanımlı bir yöntem değildir; iki komşu sütunun büyüğünü alan, isteğe bağlı bir yaklaşımdır.- Tablo 4.1'in yalnızca yerinde dökme betonarme (A) grubu dahildir; önüretimli, çelik ve diğer sistemler için R ve D doğrudan verilmelidir. 4.3.4.5–4.3.4.7'deki devrilme momenti koşullarına bağlı R/D değişiklikleri, Bölüm 13 (yüksek binalar) ve deprem hesabının kendisi kapsam dışıdır.
- PGA ve PGV yalnızca raporlama için taşınır; Bölüm 2 standart spektrumunda kullanılmaz.
- Bu paket bir mühendislik yardımcısıdır; resmi proje hesaplarında sonuçlar yürürlükteki yönetmelik metniyle kontrol edilmelidir.
Akademik atıf
@software{eminoglu_tr_tbdy,
author = {Eminoğlu, Yusuf},
title = {tr-tbdy},
year = {2026},
version = {0.1.1},
url = {https://github.com/YusufEminoglu/tr_tbdy_sdk}
}
Lisans
MIT © 2026 Yusuf Eminoğlu. İletişim: geospacephilo@gmail.com
Metadata
Release files for tr-tbdy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tr_tbdy-0.1.1.tar.gz | 37.2 kB | With provenance | Details for tr_tbdy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tr_tbdy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tr_tbdy-0.1.1-py3-none-any.whl |
Total release size: 66.8 kB
Release files / tr_tbdy-0.1.1.tar.gz
| Download URL | tr_tbdy-0.1.1.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d747d3f77a37b3554b3e899cc76ef4fcb1f417fb0531349a2f2dcd28bdd13a88
|
|
BLAKE2b-256 checksum How to use checksums |
e50765e07acb5de038acad66000539c9ce7440311534b608d14a12ad33c0d874
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / tr_tbdy-0.1.1-py3-none-any.whl
| Download URL | tr_tbdy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4802c25576747a1d6c9b85e443b84e33ab8997abe6e56da0965884014e95d201
|
|
BLAKE2b-256 checksum How to use checksums |
2665dd2facbdfd4b5173e2b417fad28900f929f9ada4935533b6a4ac10e93304
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for tr-tbdy 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tr_tbdy-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.