# pedrosecchi67/lovelacepm architecture

> Architecture diagram of the GitHub repository pedrosecchi67/lovelacepm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pedrosecchi67/lovelacepm
- Repository: https://github.com/pedrosecchi67/lovelacepm

## Overview

LovelacePM is a Python 3D vortex-panel aircraft-analysis package. The documented workflow builds wing and body geometry into a shared Solid, discretizes it into panels, adds a wake, solves for the aerodynamic state, then reports forces and stability or plots results. It also supports control surfaces, dynamic simulation, and optional Xfoil viscous corrections. The graph follows README-described stages and sampled call sites; unsampled implementations are represented only where the README establishes the capability.

Main entry points: [`LovelacePM/aircraft.py`](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py) (Aircraft model), [`LovelacePM/paneller.py`](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/paneller.py) (Panel Solid), [`LovelacePM/xfoil_visc.py`](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/xfoil_visc.py) (Polar correction), [`LovelacePM/wing.py`](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py) (Wing sections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_geometry["Aircraft geometry"]
  node_airfoil_data["Airfoil data<br/>[wing.py]"]
  node_wing_section["Wing sections<br/>[wing.py]"]
  node_wing_quadrant["Wing quadrants<br/>[wing.py]"]
  node_wing["Wings<br/>[wing.py]"]
  node_body["Body geometry<br/>[body.py]"]
  node_control["Control surfaces<br/>[control.py]"]
  node_aircraft["Aircraft model<br/>[aircraft.py]"]
end

subgraph group_solver["Panel flow solver"]
  node_solid["Panel Solid<br/>[paneller.py]"]
  node_panel_math["Influence kernels<br/>[pytoolkit.py]"]
  node_wake["Wake model<br/>[paneller.py]"]
  node_euler["Euler solution<br/>[aircraft.py]"]
end

subgraph group_analysis["Analysis and results"]
  node_forces["Forces report<br/>[aircraft.py]"]
  node_stability["Stability analysis<br/>[aircraft.py]"]
  node_dynamics["Dynamic simulation<br/>[pyfdyn.py]"]
  node_plots["Aerodynamic plots"]
end

subgraph group_viscous["Viscous corrections"]
  node_polar["Polar correction<br/>[xfoil_visc.py]"]
  node_polar_data["Polar files<br/>[xfoil_visc.py]"]
end

node_engineer(("Aircraft designer"))
node_xfoil(("Xfoil executable"))

node_engineer -->|"defines sections"| node_wing_section
node_airfoil_data -->|"supplies profile"| node_wing_section
node_engineer -->|"defines body"| node_body
node_engineer -->|"defines controls"| node_control
node_wing_section -->|"forms span region"| node_wing_quadrant
node_wing_quadrant -->|"gathers quadrants"| node_wing
node_wing -->|"composes panels"| node_solid
node_body -->|"composes panels"| node_solid
node_control -->|"configures surfaces"| node_wing_quadrant
node_engineer -->|"assembles model"| node_aircraft
node_wing -->|"joins elements"| node_aircraft
node_body -->|"joins elements"| node_aircraft
node_aircraft -->|"adds wake"| node_wake
node_wake -->|"updates influence"| node_solid
node_solid -->|"calculates influence"| node_panel_math
node_aircraft -->|"requests solution"| node_euler
node_euler -->|"solves panels"| node_solid
node_aircraft -->|"calculates loads"| node_forces
node_aircraft -->|"calculates derivatives"| node_stability
node_aircraft -->|"simulates motion"| node_dynamics
node_engineer -->|"requests plots"| node_plots
node_plots -->|"reads results"| node_solid
node_engineer -.->|"requests correction"| node_polar
node_polar -.->|"runs analysis"| node_xfoil
node_polar -.->|"reads and writes"| node_polar_data
node_polar -.->|"supplies correction"| node_wing_section

click node_airfoil_data "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py"
click node_wing_section "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py"
click node_wing_quadrant "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py"
click node_wing "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py"
click node_body "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/body.py"
click node_control "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/control.py"
click node_aircraft "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py"
click node_solid "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/paneller.py"
click node_panel_math "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/pytoolkit.py"
click node_wake "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/paneller.py"
click node_euler "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py"
click node_forces "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py"
click node_stability "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py"
click node_dynamics "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/pyfdyn.py"
click node_plots "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aerodynamic_output.py"
click node_polar "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/xfoil_visc.py"
click node_polar_data "https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/xfoil_visc.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_airfoil_data,node_wing_section,node_wing_quadrant,node_wing,node_body,node_control,node_aircraft toneBlue
class node_solid,node_panel_math,node_wake,node_euler toneAmber
class node_forces,node_stability,node_dynamics,node_plots toneMint
class node_polar,node_polar_data toneRose
class node_engineer,node_xfoil toneIndigo
```

## Components

### Aircraft geometry

- [Airfoil data](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py): `LovelacePM/wing.py`
- [Wing sections](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py): `LovelacePM/wing.py`
- [Wing quadrants](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py): `LovelacePM/wing.py`
- [Wings](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/wing.py): `LovelacePM/wing.py`
- [Body geometry](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/body.py): `LovelacePM/body.py`
- [Control surfaces](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/control.py): `LovelacePM/control.py`
- [Aircraft model](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py): `LovelacePM/aircraft.py`

### Panel flow solver

- [Panel Solid](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/paneller.py): `LovelacePM/paneller.py`
- [Influence kernels](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/pytoolkit.py): `LovelacePM/pytoolkit.py`
- [Wake model](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/paneller.py): `LovelacePM/paneller.py`
- [Euler solution](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py): `LovelacePM/aircraft.py`

### Analysis and results

- [Forces report](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py): `LovelacePM/aircraft.py`
- [Stability analysis](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aircraft.py): `LovelacePM/aircraft.py`
- [Dynamic simulation](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/pyfdyn.py): `LovelacePM/pyfdyn.py`
- [Aerodynamic plots](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/aerodynamic_output.py): `LovelacePM/aerodynamic_output.py`

### Viscous corrections

- [Polar correction](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/xfoil_visc.py): `LovelacePM/xfoil_visc.py`
- [Polar files](https://github.com/pedrosecchi67/lovelacepm/blob/master/LovelacePM/xfoil_visc.py): `LovelacePM/xfoil_visc.py`

### Other components

- **Aircraft designer**
- **Xfoil executable**

## Connections

- Aircraft designer → Wing sections: defines sections
- Airfoil data → Wing sections: supplies profile
- Aircraft designer → Body geometry: defines body
- Aircraft designer → Control surfaces: defines controls
- Wing sections → Wing quadrants: forms span region
- Wing quadrants → Wings: gathers quadrants
- Wings → Panel Solid: composes panels
- Body geometry → Panel Solid: composes panels
- Control surfaces → Wing quadrants: configures surfaces
- Aircraft designer → Aircraft model: assembles model
- Wings → Aircraft model: joins elements
- Body geometry → Aircraft model: joins elements
- Aircraft model → Wake model: adds wake
- Wake model → Panel Solid: updates influence
- Panel Solid → Influence kernels: calculates influence
- Aircraft model → Euler solution: requests solution
- Euler solution → Panel Solid: solves panels
- Aircraft model → Forces report: calculates loads
- Aircraft model → Stability analysis: calculates derivatives
- Aircraft model → Dynamic simulation: simulates motion
- Aircraft designer → Aerodynamic plots: requests plots
- Aerodynamic plots → Panel Solid: reads results
- Aircraft designer → Polar correction: requests correction
- Polar correction → Xfoil executable: runs analysis
- Polar correction → Polar files: reads and writes
- Polar correction → Wing sections: supplies correction
