Code Monkey home page Code Monkey logo

Computational Fluid Dynamics

Here is a collection of MATLAB code (compatible with Octave) that might be of some help in solving various types of computational fluid dynamics problems. Functionally the codes produce valid results; however, I am sure there is room for improvement from an efficiency standpoint. The original project description from my professor is also posted for each type of problem.

Octave Compatibility

Tested with Octave 6.2.0 (arm64 Mac)

Diffusion PDE

Finite difference approximation of a given couette flow between two parallel plates. The fluid has a constant kinematic viscosity and density. The upper plate is stationary and the lower one is suddenly set in motion with a constant velocity. Governing partial differential equation (PDE) is discretized using a first-order forward-time and second-order central space (FTCS) scheme.

See Description

Example Plot

Diffusion PDE Plot

Convection-Diffusion PDE

Comparison between finite difference and finite volume approximations of wave propagation inside a one-dimensional channel. Fluid velocity and diffusion coefficient are given in addition to initial conditions along the channel and boundary conditions at the inlet and outlet. Forward Time-Centered Space (FTCS) and first-order upwind are used for finite volume approximations while FTCS, first-order upwind, Lax-Wendroff and MacCormack are used for finite difference.

See Description

Example Plot

Convection-Diffusion PDE Plot

Elliptic PDE

Steady-state temperature distribution of a two-dimensional rectangular plate is approximated using finite difference method. Plate dimensions and boundary conditions at the edges are given. Different types of relaxation are applied: Point Successive Over-Relaxation (PSOR), Line Successive Over-Relaxation (LSOR), and Alternative Direction Implicit (ADI).

See Description

Example Plots

Elliptic PDE Plot #1 Elliptic PDE Plot #2 Elliptic PDE Plot #2

Vorticity-Stream Function Method

The steady-state u-velocity profile of an incompressible laminar flow within a plane channel is approximated using finite difference. The flow is governed by both vorticity and stream-function transport equations.

See Description

Example Plots

Vorticity PDE Plot #2 Vorticity PDE Plot #2

computational-fluid-dynamics's Projects

ample icon ample

AMPLE - A Material Point Learning Environment

barriertool icon barriertool

Automated extraction of barriers to diffusive transport in two-dimensional velocity fields

blastfoam icon blastfoam

A CFD solver for multi-component compressible flow with application to high-explosive detonation, explosive safety and air blast

computational-fluid-dynamics icon computational-fluid-dynamics

:cyclone: Selected MATLAB code I wrote while taking a CFD class in graduate school. Finite-difference and finite volume approximations are compared to analytical solutions. Project descriptions are included. :cyclone:

cpp icon cpp

Lecture notes, projects and other materials for Course 'CS205 C/C++ Program Design' at Southern University of Science and Technology.

cppcoreguidelines icon cppcoreguidelines

The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++

cppreference2mshelp icon cppreference2mshelp

cppreference.com html archive converter to microsoft help (for Visual Studio 2012+) and chm help (for Windows)

featool-multiphysics icon featool-multiphysics

FEATool - "Physics Simulation Made Easy" (Fully Integrated FEA, FEniCS, OpenFOAM, SU2 Solver GUI & Multi-Physics Simulation Platform)

finite_volume_methods icon finite_volume_methods

Course notes for a course based on R.J. LeVeque's "Finite Volume Methods for Hyperbolic Problems"

fixed-wing-sim icon fixed-wing-sim

Matlab implementation to simulate the non-linear dynamics of a fixed-wing unmanned areal glider. Includes tools to calculate aerodynamic coefficients using a vortex lattice method implementation, and to extract longitudinal and lateral linear systems around the trimmed gliding state.

flowpanel.jl icon flowpanel.jl

Three-dimensional panel method for high-Reynolds aerodynamics

fluidlab icon fluidlab

[ICLR 2023] FluidLab: A Differentiable Environment for Benchmarking Complex Fluid Manipulation

ib-matlab icon ib-matlab

2D & 3D Matlab codes for the Immersed Boundary Method

ib2d icon ib2d

An easy to use immersed boundary method in 2D, with full implementations in MATLAB and Python that contains over 60 built-in examples, including multiple options for fiber-structure models and advection-diffusion, Boussinesq approximations, and/or artificial forcing.

ibamr icon ibamr

An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method

isc-4933 icon isc-4933

Notes from ISC 4933/5935: Iterative and Direct Solvers for Linear Systems

lcstool icon lcstool

LCS Tool is a computational engine for analyzing fluid flows by extracting their most influential material surfaces, Lagrangian Coherent Structures.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.