Skip to main content

Institutional Physics-based Engine and Protocol for Global Commodity Arbitration

Project description

phytrade (v1.2.9)

Institutional Physics Library and Protocol for Global Commodity Arbitration

phytrade is a high-precision computational physics framework designed to resolve mass, quality, and environmental disputes in international trade. By implementing industry-standard thermodynamics, fluid dynamics, and mechanical stress models, it provides an objective "Arbitrator" for maritime and land-based commerce.


🏛️ Project Architecture: The 50-Problem Roadmap

Version 1.2.9 marks the transition from a specialized thermal tool to a comprehensive physics engine. All five core domains are now Active, populating the library with the first 50 essential problem-solvers for global trade.

Category Domain Status Scope
I Thermodynamics Active Problems 1-10 (Moisture, Heat, PCM)
II Fluid Dynamics Active Problems 11-20 (Drag, Cavitation, Siltation)
III Mechanical Active Problems 21-30 (Stress, Torque, Wind Tech)
IV Logistics Active Problems 31-40 (Platooning, Docking, Routing)
V Strategic Active Problems 41-50 (ROI, Risk, Game Theory)

🚀 Key Features (v1.2.9 Expansion)

The library now supports multi-domain arbitration across the following engines:

  • Thermo (Category I): Mass Deconvolution (ASABE D245.7), Container Rain Prediction, and Perishable Respiration models.
  • Fluids (Category II): Hull Skin Friction analysis for bio-fouling, Propeller Cavitation erosion risk, and Port Siltation depth impact on cargo capacity.
  • Mechanical (Category III): Wind-Assisted Propulsion (Sails/Rotors) force calculation, Shaft Torque monitoring, and Hull Stress analysis.
  • Logistics (Category IV): Aerodynamic Drafting (Truck/Ship Platooning) fuel savings and optimized Dry-Docking scheduling.
  • Strategic (Category V): Economical Speed optimization, Strategic Reserve utilization, and Market Volatility hedging.

##🛠 Usage: The "Any Port" Arbitrator To bypass localized data naming conventions, use the v1.2.9 mapping bridge:

'''bash

from phytrade.engine import Engine from phytrade.schema import Schema from phytrade.mapper import Mapper

1. Initialize the Protocol

schema = Schema() mapper = Mapper() engine = Engine(baseline_entropy=1.5, schema=schema, mapper=mapper)

2. Define Local Port Jargon (e.g., Singapore, Rotterdam, or Chattogram)

local_mapping = { "vessel_displacement": "mass", "current_sog": "velocity", "arrival_delay": "delta_t", "cargo_value_usd": "contract_value" }

3. Raw Telemetry Data

raw_data = { "vessel_displacement": 180000, "current_sog": 24.5, "arrival_delay": 72, "cargo_value_usd": 15000000 }

4. Execute Objective Arbitration

This bypasses human bias by using the laws of physics as the contract base.

mapped_data = {local_mapping[k]: v for k, v in raw_data.items()} result = engine.calculate_dispute_value(**mapped_data)

print(f"Arbitration Status: {result['status']}") print(f"Recommended Settlement: ${result['recommended_settlement_usd']:,.2f}")

📦 Installation

pip install phytrade

🛠️ Usage  
To integrate the arbitration engine into your workflow, initialize the specific domain arbitrator:

from phytrade import ThermoArbitrator, FluidsArbitrator, MechanicalArbitrator

# 1. Initialize the Engines
thermo = ThermoArbitrator()
fluids = FluidsArbitrator()
mech = MechanicalArbitrator()

# 2. Solve a Hull Friction Dispute (Problem 11)
# Estimate drag increase from bio-fouling (15% fouling index) at 12 knots
drag_increase = fluids.estimate_hull_skin_friction(
    velocity=6.17,  # 12 knots in m/s
    wetted_area=3500, 
    bio_fouling_index=0.15
)

# 3. Calculate Wind Propulsion Offset (Problem 19)
wind_force = mech.calculate_wind_propulsion(
    wind_speed=15.0, 
    sail_area=200, 
    angle=45
)

print(f"Added Drag Force: {drag_increase} N")
print(f"Wind Assist Force: {wind_force} N")

📝 Standards Compliance
phytrade adheres to international scientific and engineering standards, including:

ASABE D245.7: Moisture relationships for agricultural products.

ASTM D2495: Standard test method for moisture in cotton.

ITTC Recommended Procedures: For Hull Resistance and Propeller Cavitation.

ISO 19011: Guidelines for auditing management systems.

IMO MARPOL Annex VI: For Carbon Intensity Indicator (CII) modeling.

📄 License & Citation
License:Proprietary. All rights reserved.

If you use this library in commercial arbitration or academic research, please cite it using the included CITATION.cff file:

Plaintext:

Asif, K. S. (2026). phytrade: Institutional Physics Library for Global Commodity Arbitration (v1.2.6).

Author: Kazi Saad Asif

Contact: kazisaadasif29@gmail.com

GitHub: ksaad20/phytrade

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phytrade-1.3.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phytrade-1.3.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file phytrade-1.3.0.tar.gz.

File metadata

  • Download URL: phytrade-1.3.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for phytrade-1.3.0.tar.gz
Algorithm Hash digest
SHA256 fa744a420901ef7fb819b7f8689a89af1ee3f7f74a75bd14a05a220633ec4495
MD5 cb074738903beb03b3180e07d7229f95
BLAKE2b-256 de9a27b69441f46a638c746c41a7684262586c215a4a6d2cd318a4bba7f0b55c

See more details on using hashes here.

Provenance

The following attestation bundles were made for phytrade-1.3.0.tar.gz:

Publisher: publish.yml on ksaad20/phytrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phytrade-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: phytrade-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for phytrade-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50c71bd4b25bae46bf27149948cee521596a10ad5934684e9cdbad90cbd61b2c
MD5 98f4656ff4f4753dd7113f27d781226b
BLAKE2b-256 d47c3962ca425157b574a68fcfb4d00b143f98120ba5da09a4b78f5b65f4ea0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for phytrade-1.3.0-py3-none-any.whl:

Publisher: publish.yml on ksaad20/phytrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page