Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ramtarun02/FlowVFP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

166 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowVFP — Viscous Full Potential Flow Solver

FlowVFP is a browser-based aerodynamic analysis application for transonic aircraft design. It provides an interactive web interface to the ESDU Viscous Full Potential (VFP) solver, replacing the legacy MATLAB/CLI workflow with a modern, collaborative, cross-platform solution.

Live application: https://ramtarun02.github.io/VFP-2025


Table of Contents


What is FlowVFP?

The VFP (Viscous Full Potential) method is a transonic CFD technique developed by ESDU that couples a full-potential inviscid flow solver with a viscous boundary-layer correction. It is particularly suited for conceptual and preliminary aircraft wing design where rapid turnaround and reasonable accuracy are needed at transonic Mach numbers.

FlowVFP wraps this solver in a modern web application, enabling users to:

  • Import and edit wing geometry interactively, with real-time 2D and 3D visualisation
  • Generate solver input files (GEO, MAP, DAT) using the integrated FPCON tool
  • Run simulations directly from the browser with live terminal output via WebSocket
  • Automate parameter sweeps across angle-of-attack or Mach number ranges (AutoRunner)
  • Post-process results — pressure coefficients (Cp), boundary-layer data, aerodynamic forces, wave drag, contour plots
  • Analyse propeller-wing interaction using the ProWiM (Propeller-Wing Interaction Model) module
  • Export results to Excel spreadsheets for reporting and further analysis

The solver itself is a set of Fortran executables (vfphe.exe, visflow.exe, f137b1.exe) that run on the server. The web application orchestrates file preparation, solver execution, and result extraction without requiring users to interact with command-line tools or manage file structures manually.


Who is it for?

Audience How FlowVFP helps
Aerospace engineers in conceptual/preliminary design Rapid aerodynamic analysis of wing configurations at transonic speeds without the overhead of full Navier-Stokes solvers
Researchers studying potential flow and boundary-layer effects Interactive exploration of flow solutions, immediate feedback on geometry changes, easy parameter sweeps
Students learning CFD and aircraft design Intuitive interface that abstracts CLI complexity; visual feedback reinforces theoretical understanding
Design teams Multi-user, browser-based access from any OS; no per-seat licence fees; collaborative analysis sessions

Advantages Over the Legacy VFP CLI / MATLAB GUI

  • Cross-platform: Runs in any modern browser — Windows, macOS, Linux
  • No local installation for end users: access via a URL
  • Integrated FPCON: Generate VFP input files without leaving the application
  • AutoRunner: Automated continuation runs across AoA/Mach sweeps with Excel export
  • Real-time feedback: Live solver output streamed to the browser
  • Modern visualisation: Interactive Plotly charts, Three.js 3D models, D3 contour plots
  • No licensing costs: Built on open-source technologies (React, Flask, Python)
  • Cloud-deployable: Hosted on Azure App Service / GitHub Pages, ready for institutional servers

Application Modules

FlowVFP is organised into four primary modules, each corresponding to a distinct phase of the aerodynamic design and analysis workflow.

1. Geometry Module

The Geometry Module is the entry point for any analysis. It allows users to define, inspect, and modify the 3D wing geometry used by the VFP solver.

Key capabilities:

  • Import .GEO files — Upload one or multiple wing geometry files. Each file is parsed into section data and plotted instantly in 2D (planform, section profile, twist/dihedral distributions) and 3D (wireframe wing model).

  • Section-based editing (Compute Desired) — Select any spanwise section and modify its parameters: twist angle, dihedral (HSECT), spanwise position (YSECT), leading-edge position, trailing-edge position, and chord length. Changes are computed on the server, and the updated geometry is reflected immediately in all plots. Twist modifications rotate section coordinates about the specified twist axis (XTWSEC).

  • Batch interpolation (Improve) — Apply systematic variations to twist, dihedral, or leading-edge position across a range of wing sections using one of eight interpolation methods: linear, quadratic, elliptical, cosine, power, Schuemann, Hermite, or exponential. This enables rapid planform optimisation.

  • Wing specifications — The module continuously computes and displays fundamental parameters: aspect ratio, reference span, planform area, taper ratio, sweep angles (leading edge, trailing edge, quarter chord), thickness-to-chord ratio, and section count.

  • Export .GEO files — Download the modified geometry as a properly formatted .GEO file, ready for use in the Solver Module or external tools.

  • FPCON — Input file generation — An integrated component that collects geometry parameters and aerodynamic conditions, then generates the three solver input files:

    • Geometry file (.GEO) — Wing section coordinates and planform definition
    • Mapping file (.MAP) — Computational grid mapping parameters
    • Flow file (.DAT) — Flight conditions (Mach number, angle of attack, Reynolds number, grid levels)

Typical workflow:

  1. Import a .GEO file (or generate one via FPCON)
  2. Inspect the wing in 2D/3D views
  3. Modify sections or apply batch improvements
  4. Export the final .GEO file
  5. Proceed to the Solver Module

2. Solver Module

The Solver Module manages the setup, execution, and monitoring of VFP simulations.

Key capabilities:

  • Simulation setup — Configure the simulation by specifying a simulation name, angle of attack, Mach number, and selecting the input files (wing GEO/MAP/DAT; optional tail GEO/MAP/DAT; optional body files).

  • Upload input files — Drag-and-drop or browse to upload the required .GEO, .MAP, and .DAT files for wing and (optionally) tail configurations.

  • Run simulation — Start the VFP solver with a single click. The solver output (convergence messages, iteration information, warnings) is streamed in real time to a terminal panel in the browser via WebSocket. No need to monitor a separate console window or SSH session.

  • Stop simulation — Cancel a running simulation at any time. The server terminates the solver process tree immediately.

  • Three execution modes:

    Mode Description
    Standard Wing analysis → downwash computation → tail flow modification → tail analysis. Complete wing-tail aerodynamic assessment in one run.
    Continuation Resume a previous simulation from saved dump files (fort11, fort15, fort21, etc.). Useful for extending converged solutions to nearby conditions.
    AutoRunner Automated sweep through a range of angles of attack or Mach numbers. Each step is a continuation from the previous converged solution. Results are exported to a formatted Excel spreadsheet with wing, tail, and total force/moment tables.
  • Continuation run sources — Dump data for continuation runs can come from three sources:

    1. Previously saved .vfp result files (embedded dump data)
    2. Split JSON archives stored on the server
    3. Browser-side IndexedDB storage (no server upload required — privacy-preserving)
  • Result collection — Upon completion, the solver output files (forces, Cp distributions, boundary-layer data, wave drag, convergence summaries) are collected and packaged into a single .vfp JSON archive for download and post-processing.


3. VFP-Post Module

The VFP-Post module provides comprehensive post-processing tools for analysing simulation results.

Key capabilities:

  • Upload .vfp result files — Large result archives (100 MB+) are handled via a streaming parser that processes the file progressively without running out of memory. Result data is stored locally in the browser's IndexedDB for instant access.

  • Pressure coefficient (Cp) plots — View chordwise Cp distributions for each wing section at each analysis level, with separate upper/lower surface curves. Compare results across flow conditions.

  • Force and moment analysis — Display spanwise distributions of CL, CD, CM, circulation (Gamma), and local twist. View integrated force coefficients:

    • CL (lift coefficient)
    • CD (total drag coefficient)
    • CDi (induced drag)
    • CDv (viscous drag)
    • CDw (wave drag)
    • CM (pitching moment)
  • Boundary-layer data — Visualise boundary-layer properties along each section: displacement thickness, momentum thickness, shape factor (H), skin friction coefficient (Cf), edge velocity ratios, and transition location.

  • 2D contour plots — Generate colour-filled contour maps of Cp, Mach number, or other flow variables across the wing planform using scipy griddata interpolation.

  • Wave drag analysis — Examine upper and lower surface wave drag contributions at transonic conditions.

  • Tail downwash computation — Calculate the downwash angle (epsilon) at the tail location using Lifting Line Theory (LLT) with a horseshoe vortex model. Based on wing circulation distribution and tail geometry from a .tail specification file.


4. ProWiM Module

The ProWiM (Propeller-Wing Interaction Model) module computes the aerodynamic interference effects between propeller slipstreams and the wing.

Key capabilities:

  • Slipstream parameters — Compute KS0D (slipstream viscous loss factor) and TS0D (slipstream temperature ratio) based on propeller thrust coefficient and slipstream geometry.

  • Interference forces — Calculate the additional lift and drag contributions caused by propeller slipstream interaction:

    • CZ, CX — Total force coefficients with slipstream
    • CZwf, CXwf — Wing-fuselage contributions
    • CZDwf, CXDwf — Incremental contributions due to slipstream
  • Input parameters — Wing aspect ratio, span-to-diameter ratio (b/D), chord-to-diameter ratio (c/D), zero-lift angle, propeller count, slipstream angle, flap configuration, and thrust coefficients.


Workflow — From Geometry to Results

The following diagram illustrates the complete aerodynamic analysis workflow through FlowVFP:

  ┌──────────────────────────┐
  │    1. GEOMETRY MODULE    │
  │                          │
  │  Import / Create .GEO    │
  │  Edit sections & planform│
  │  Generate input files    │
  │  (GEO + MAP + DAT)       │
  └────────────┬─────────────┘
               │
               ▼
  ┌──────────────────────────┐
  │     2. SOLVER MODULE     │
  │                          │
  │  Upload input files      │
  │  Configure AoA / Mach    │
  │  Run VFP solver          │
  │  (live terminal output)  │
  │  Download .vfp results   │
  └────────────┬─────────────┘
               │
               ▼
  ┌──────────────────────────┐
  │    3. VFP-POST MODULE    │
  │                          │
  │  Upload .vfp file        │
  │  Cp plots per section    │
  │  Force & moment analysis │
  │  Boundary-layer data     │
  │  Contour plots           │
  │  Wave drag analysis      │
  │  Tail downwash (LLT)     │
  └──────────────────────────┘

  ┌──────────────────────────┐
  │    4. ProWiM MODULE      │  (standalone — can be used at any stage)
  │                          │
  │  Propeller-wing          │
  │  interference analysis   │
  └──────────────────────────┘

Getting Started

For End Users (No Installation Required)

Navigate to: https://ramtarun02.github.io/VFP-2025

The application runs entirely in the browser. You need a modern web browser (Chrome, Firefox, Safari, or Edge) and an internet connection.

For Local Development

Refer to the developer documentation in each sub-project:

Quick-start summary:

Prerequisite Version
Node.js ≥ 20 LTS
Python ≥ 3.11
pip ≥ 23
# 1. Backend
cd VFP-Python
python -m venv .venv
.venv\Scripts\activate            # Windows
pip install -r requirements.txt
python wsgi.py                    # → http://127.0.0.1:5000

# 2. Frontend (in a separate terminal)
cd VFP-2025
npm install
npm run dev                       # → http://localhost:3000

Wing Geometry File Format

The .GEO file is the primary input format for defining wing geometry. It follows the ESDU 02014 standard and specifies:

  • Header: Number of spanwise sections (NSECT), interpolation parameters
  • Sections (in order of increasing spanwise coordinate, starting at y = 0):
    • Spanwise position (YSECT)
    • Leading-edge coordinate (G1SECT) and trailing-edge coordinate (G2SECT)
    • Vertical displacement / dihedral (HSECT)
    • Twist angle (TWSIN) about twist axis position (XTWSEC)
    • Upper surface coordinates (MU points) and lower surface coordinates (ML points)
    • Section marker (IMARK) indicating whether coordinates differ from the inboard section
  • Body definition (optional): Streamwise stations with radius values (XRAD, RAD) for axisymmetric fuselage; set NRAD = 0 for wing-alone cases.

Constraints:

  • 2 ≤ NSECT ≤ 38
  • First section must be at y = 0 (symmetry plane)
  • Last section must be at the wing tip
  • Maximum 125 coordinate pairs per surface (upper/lower)
  • File extension is case-sensitive: .GEO (uppercase)

For complete format specification, refer to Section 4.1 of ESDU 02014.


Supported File Types

Extension Description Used by
.GEO Wing geometry definition (sections, coordinates, body) Geometry Module, Solver
.MAP Computational grid mapping parameters Solver
.DAT Flow conditions (Mach, AoA, Reynolds number, grid levels) Solver
.vfp FlowVFP result archive (JSON containing all input + output data) VFP-Post
.forces Spanwise force/moment distributions (solver output) VFP-Post
.cp Chordwise pressure coefficient distributions (solver output) VFP-Post
.vis Boundary-layer data (solver output) VFP-Post
.conv Convergence history (solver output) Solver terminal
.sum Solution summary (solver output) VFP-Post
wavedrg73*.dat Wave drag breakdown — upper/lower surface (solver output) VFP-Post
fort* Fortran dump files for continuation runs (fort11, fort15, fort21, fort50, fort51, fort52, fort55) Solver (continuation)
.tail Tail geometry specification for downwash calculation VFP-Post
.xlsx AutoRunner Excel export with formatted polar tables AutoRunner output

Example Case

The examples/Wing1/ directory contains a sample wing case to get started:

File Description
DC304_v2p9_twist_BSL.GEO Wing geometry for a transonic transport wing configuration
DC304_v2p9.map Grid mapping file for the DC304 geometry
M070Re0p00ma+00p00.DAT Flow conditions: Mach 0.70, AoA 0.00°

To run this example:

  1. Open the Geometry Module and import DC304_v2p9_twist_BSL.GEO
  2. Inspect the wing planform and sections in the 2D/3D views
  3. Navigate to the Solver Module
  4. Upload the three input files (GEO, MAP, DAT)
  5. Set a simulation name and click Run
  6. Monitor solver output in the live terminal
  7. Download the .vfp result file
  8. Open VFP-Post and upload the .vfp file to analyse Cp, forces, and boundary-layer data

Repository Structure

FlowVFP/
├── VFP-2025/                    React / TypeScript frontend client
├── VFP-Python/                  Python / Flask backend server
├── examples/                    Sample wing geometry cases
│   └── Wing1/                   DC304 transonic wing example
├── json-analyzer-with-data/     Standalone JSON analysis tool for large VFP files
├── README.md                    This file
└── SECURITY_AUDIT.md            Security vulnerability audit and remediation report
Component Technology Description
VFP-2025 React 19, TypeScript, Vite, Tailwind CSS, Plotly, Three.js, D3, Socket.IO Browser-based UI for geometry editing, simulation control, and post-processing
VFP-Python Python 3.11+, Flask, Flask-SocketIO, NumPy, SciPy, Pandas REST API server, WebSocket simulation handler, VFP solver orchestration
VFP Solver Fortran (compiled executables) vfphe.exe (inviscid solver), visflow.exe (viscous coupling), f137b1.exe (wave drag)

Deployment

Component Platform Details
Frontend GitHub Pages Static build served from gh-pages branch at /VFP-2025 sub-path
Backend Azure App Service Python web app with WebSocket support; configured via web.config and startup.py
Backend (alt) Render.com Docker-based deployment with persistent disk; configured via render.yaml

Security

FlowVFP has undergone a comprehensive security audit with 18 findings (3 Critical, 5 High, 6 Medium, 4 Low) — all fully remediated. Key protections include:

  • Path traversal prevention on all file operations
  • Shell injection prevention (no shell=True subprocess calls)
  • JSON Schema validation on all API inputs
  • Rate limiting on all endpoints
  • CORS restricted to allowed origins
  • Upload size cap (100 MB)
  • Filename sanitisation
  • No stack traces in production responses

For full details, see SECURITY_AUDIT.md.


References

  1. ESDU 02014Full-potential (FP) method for three-dimensional wings and wing-body combinations — inviscid flow. Part 2: Use of FP and related programs. Engineering Sciences Data Unit, 2002.

Licence

This software is released under a Cranfield University Academic License. It may be used freely by Cranfield University students, staff, and researchers for academic and educational purposes. Use by anyone outside Cranfield University requires prior written consent from the copyright holder.

See LICENSE for full terms.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors