CFD Libraries

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

CFD

LIBRABRIES
◦ Computational Fluid Dynamics (CFD) is a part of fluid mechanics
that utilizes data structures and numerical calculations to analyze
and solve fluid (gases and liquids) flow problems like chemical
compositions, density, and velocity.
◦ And the tool to perform CFD analysis and solve fluid flow

What is problems is CFD software. It ensures that the best flow concepts
are used from the early stages of product design to enable

CFD?
components to work efficiently under various conditions.
◦ CFD makes it easy to analyze complex fluid flow problems
involving liquid-gas, fluid-solid, or fluid-fluid interactions. It uses
advanced solvers to transform physical laws from partial
differential equations into algebraic equations plus solve them
efficiently.
◦ Its typical applications are flow around manifolds,
electronic cooling, heat exchangers, and aerodynamics.
You get many CFD analysis tools for FEA integration,
rotating system analysis, external and internal flow
analysis, electronics cooling module, free surface
dynamics, particle study, and HVAC module.
◦ This CFD software integrates with SOLIDWORKS and
uses the CAD interface for analysis. It can recognize
SOLIDWORKS fluid volume automatically in a design depending on the
analysis type and allows you to run multiple CFD
scenarios and create analysis templates with accurate
inputs and parameters. You can also leverage dynamic
meshing with automatic mesh refining for high-fluid
activity.
CFD Python
Dependencies
◦ To use these lessons, you need Python 3, and the
standard stack of scientific Python: NumPy,
Matplotlib, SciPy, Sympy. And of course, you need 
Jupyter—an interactive computational environment
that runs on a web browser.
◦ The code is organized into three different files or scripts.
The first — “FlowPy.py” — contains the code for the

Organization solution of the PDEs using the finite difference method


for a general set of inputs. The inputs are provided to
of the Code this script using the “FlowPy_Input.py” script which acts
as a user interface. Finally, the “FlowPy_Visualizer.py”
script is used to animate the dynamics of the flow after
running the simulation.
The Simulation Code —
FlowPy

◦ An advantage of writing the code in Python is that we can


make use of Object Oriented Programming (OOP) to
organize and simplify the code. This will also make adding
the heat and mass transfer extensions to this quite
straightforward. Therefore, the code is organized into
various classes and functions that operate on objects of
these classes. Save the code in section 5 to a file
named FlowPy.py
◦ Step 1:
following modules are required — numpy and os
◦ Step 2:
Build Classes
we make a Boundary class that has two properties — type
Steps and value (The PDEs are solved by applying certain
boundary conditions which indicate how the fluid will
behave at the boundaries of the domain. For example, fluid
flowing through a pipe will have a wall with zero fluid
velocity and an entry as well as exit with some specified
flow velocity.)
The import required modules and this now
Simulation includes all the things that we have defined
in FlowPy.py
User Interface ◦ import sys
— import numpy as np
import matplotlib.pyplot as plt
FlowPy_Input import matplotlib.cm as cm
from FlowPy import *
The Visualization Tool — FlowPy_Visualizer

import numpy as np
As before, first import the required
import sys
modules. Particularly, we will
import os
require
import matplotlib.pyplot as plt
the matplotlib.animation module to
import matplotlib.animation as
record the animation.
animation
C++ CFD Libraries
◦ ClusterProfiler (I think the most widely used library for pathway analysis in R) restricts the analysis to only genes present
in the annotation set in use.
◦ The restriction of the background applied by clusterProfilers is not related to the expressed transcripts in the tissue of
interest but to the genes with an associated pathway in the reference annotation set:
◦ - MSigDB: 4383 genes associated with at least one pathway;
◦ - Kegg: 5245 genes associated with at least one pathway;
◦ - Reactome: 10646 genes associated with at least one pathway;
◦ - Gene Ontology - Biological Process: 17872 genes associated with at least one pathway;
◦ Stats extracted from the msigdbr (7.5.1) R library for the human specie
OpenFOAM C++
◦ OpenFOAM is a C++ library used primarily to create executables, known as applications. OpenFOAM is distributed with
a large set of precompiled applications but users also have the freedom to create their own or modify existing ones.
Applications are split into two main categories:
1. Solvers that are each designed to solve a specific problem in computational continuum mechanics;
2. Utilities that perform simple pre-and post-processing tasks, mainly involving data manipulation and algebraic
calculations

◦ Features: Inheritance, template classes, virtual functions, operator overloading and a standard specification so that reliable
compilers are available that produce efficient executables.. 
Bibliography

https://towardsdatascience.com/computational-fluid-dynamics-using-python-modeling-laminar-flow-272dad1ebec

cagothie.net/4/1242039/?var=4476511&ab2r=0&prfrev=false&rhd=false

https://github.com/gauravsdeshmukh/FlowPy

https://www.researchgate.net/topic/CFD-Coding -to look with Mihai

https://cfd.direct/openfoam/user-guide/v9-applications/ - very in depth explanation about C++ CFD OpenFoam libraries, which
modules you have to include, what each does and their scope, along with lines of code.
Abbreviations

PDE = Partial differential equation

CFD = Computational Fluid Dynamics

FEA = finite element analysis

CAD = Computer aided design

You might also like