Giter Club home page Giter Club logo

onera / broadcast Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 4.0 2.17 MB

The open-source CFD code called BROADCAST discretises the compressible Navier-Stokes equations and then extracts the linearised N-derivative operators through Algorithmic Differentiation (AD) providing a toolbox for laminar flow dynamics.

Home Page: https://broadcast.readthedocs.io/en/latest/

License: Mozilla Public License 2.0

Fortran 92.79% C 1.56% Python 4.95% Forth 0.69% Shell 0.01%
compressible-flows high-order-methods sensitivity-analysis stability weakly-non-linear

broadcast's Introduction

See BROADCAST full documentation at readthedocs (documentation not updated, see docs/source/tutorialbl.rst for an updated tutorial).

  1. Compilation in the root folder must be done to run the code.
  2. 'srcfv' folder includes BROADCAST source -> Compilation inside this folder must be done to run the code.
  3. 'misc' folder includes Jacobian construction and all PETSc functions -> Compilation inside this folder must be done to run the code.
  4. 'ADFirstAidKit' folder to compute the adjoint through TAPENADE software -> unnecessary for BROADCAST.
  5. 'SIM' folder includes the self-similar profile generator program -> useful to initialise boundary layer simulations.

Boundary Layer case files:

To compute the baseflow of a boundary layer

  • card_bl2d_fv_npz.py -> Python card to run BROADCAST code, call BROADCAST_npz.py

-> Must be fill in by the user (Numerical param., BROADCAST options...).

  • BROADCAST_npz.py -> main program, call the functions compiled in 'srcfv' and 'misc' folders

-> Must be fill in by the user (Mesh, Adim. choice, BC location and type...).

  • BROADCAST_split_func.py -> equal to BROADCAST.py, only different organisation.
  • meshBL.py -> functions to build different cartesian stretched mesh.
  • restart_init.py -> functions to read previous solution to restart simulation (only for cartesian rectangular grids).
  • interpgrid.py -> 1st order interpolation functions (only for cartesian rectangular grids).
  • compilef90.py -> compile initialisation.f90 and set_bnd.f90.
  • initialisation.f90 -> approximated initialisation of blasius profile.
  • set_bnd.f90 -> functions which fill the ref. state inside the BC.

For resolvent (global stability) analysis of a boundary layer

  • DzMatrix.py -> Compute the transverse (z-direction) contributions to the Jacobian for 3D stability.
  • computeBLthickness -> Compute different boundary layer thicknesses, it can be used to restrict the resolvent (only for cartesian rectangular grids).
  • resolvent_all.py -> main functions to perform 2D resolvent analysis, call add. functions inside misc/PETSc_func.py.
  • resolvent_all3D_1block.py -> main functions to perform 3D resolvent analysis.
  • resolvent_all3D_1block_control.py -> main functions to perform 3D resolvent analysis with a forcing constrained at the wall.

Cylinder case files:

To compute the baseflow of a cylinder

  • card_cyl2d.py -> Python card to run BROADCAST code for cylinder, call cylinder.py

-> Must be fill in by the user (Numerical param., BROADCAST options...).

  • cylinder.py -> main program, call the functions compiled in 'srcfv' and 'misc' folders

-> Must be fill in by the user (Mesh, Adim. choice, BC location and type...).

  • meshCyl.py -> functions to build O-mesh for cylinder.

For global stability analysis of a cylinder

  • DzMatrix_cyl.py -> Compute the transverse (z-direction) contributions to the Jacobian for 3D stability.
  • biglobal_cyl.py -> main functions to perform 2D/3D (bi)global stability analysis, call add. functions inside MISC/PETSc_func.py.

To compute eigenvalue sensitivity of a cylinder

  • Product_Adjoint.py -> Normalise adjoint and direct modes with L2 norm or any other user's instructions.
  • Hessian_cyl.py -> Compute the product of the Hessian operator with a user-provided mode.
  • ProductHessian_cyl.py -> Apply the result returned by Hessian_cyl.py to the adjoint mode to compute the eigenvalue sensitivity.

To compute the coefficients of the Weakly Nonlinear Stability analysis (Sipp, Lebedev JFM 2007)

  • limitcycle_part_all.py -> compute the modes x22 & x20 and the coefficients mu & nu.

Guidelines for Weakly Nonlinear Stability coefficients computation:

  1. Compute direct mode with biglobal_cyl.py.
  2. Compute adjoint mode with biglobal_cyl.py.
  3. Normalise direct & adjoint modes with Product_Adjoint.py.
  4. Compute Hessian associated with the direct mode with Hessian_cyl.py.
  5. Compute modes x22 & x20 and the coefficients mu & nu with limitcycle_part_all.py.

broadcast's People

Contributors

apoulain22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

broadcast's Issues

Issue in compile_dz.py

Hello,

While trying to compile the dz files during installation, gfortran was not able to resolve the :

#include "dz/function_9p_dz_d.f90"

Command in the file dz/coeffs_9p_dz.F90

I was able to fix it easily by using the -I flag in the compiler set to $BROADCAST_DIR/srcv such that the command is now :

f90flags = "--f90flags='-mcmodel=medium -funroll-loops -fdefault-real-8' --opt='-Ofast' -I$BROADCAST_DIR/srcfv"

Happy to help to fix it,

Best

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.