It was a calm afternoon in Kolkata. Yesterday it rained. The weather was muggy. There was silence everywhere.... only a few crows were making sound.
Before going to school, my son Ridit suggested that we must give a try to KDevelop for our C++ projects. So I installed the KDevelop using the apt command.
As I am planning to do a deep dive in openFoam source code, the first thing I did was to navigate to the openFoam source directory and opened the project in KDevelop.
I then built it...
And voila.... my dev environment is ready.
As I shut my laptop, I realized I found a new favorite IDE—one that struck a perfect balance between simplicity and power.
Both ISRO (Indian Space Research Organisation) and DRDO (Defence Research and Development Organisation) heavily rely on CFD (Computational Fluid Dynamics) and fluid simulations for aerospace, defense, and hypersonic vehicle design. They use high-performance computing (HPC), indigenous CFD solvers, and experimental validation for these applications.
1️⃣ ISRO: CFD Applications in Space Science 🚀
ISRO uses CFD simulations in various projects related to rocketry, re-entry vehicles, aerodynamics, and propulsion systems.
✅ Key CFD Applications in ISRO
Rocket Aerodynamics & Re-entry Simulation
CFD is used to analyze airflow, pressure, and heating effects on launch vehicles like PSLV, GSLV, and LVM3.
Re-entry vehicles (Gaganyaan Crew Module) undergo hypersonic flow simulations to predict shock waves and thermal loads.
Propulsion & Combustion Analysis
CFD helps in designing cryogenic, semi-cryogenic, and solid rocket engines.
Combustion chamber simulations predict fuel mixing efficiency and pressure variations in engines like Vikas and CE-20.
Hypersonic Vehicle Simulations
Reusable Launch Vehicles (RLV) and Scramjets require CFD to analyze Mach 5+ speeds.
ISRO’s Scramjet Engine Test Flight (ATV) used CFD to predict shock interaction and fuel-air mixing.
Satellite Thermal & Fluid Analysis
Thermal control systems use CFD to analyze fluid movement inside heat pipes.
Cryogenic fuel behavior inside tanks is simulated for fuel sloshing and vapor formation.
🖥️ Software & Tools Used in ISRO
OpenFOAM & Fluent – Used for general CFD analysis.
ISRO’s In-house CFD Solvers – Developed for hypersonic flow and propulsion studies.
ParaView & Tecplot – Used for visualizing simulation results.
HPC Clusters – "SAGA" supercomputer is used for large-scale simulations.
💡 Example: ISRO used CFD to analyze the Gaganyaan Crew Module’s re-entry heating, ensuring astronauts survive high temperatures.
2️⃣ DRDO: CFD in Defense & Hypersonic Research 🛡️
DRDO (Defence Research and Development Organisation) applies fluid simulations in missiles, hypersonic systems, naval hydrodynamics, and UAVs.
✅ Key CFD Applications in DRDO
Missile Aerodynamics & Guidance
CFD is used to simulate airflows around missiles like Agni, BrahMos, and Astra.
Studies include drag reduction, shock waves, and stability analysis.
Hypersonic Weapons & Scramjet Engines
Hypersonic Technology Demonstrator Vehicle (HSTDV) used CFD for shockwave & heat analysis.
Scramjet CFD simulations analyze airflow and combustion at Mach 6+ speeds.
Naval Hydrodynamics & Submarine CFD
DRDO’s naval research (NSTL, Visakhapatnam) uses CFD for submarine stealth, torpedo movement, and cavitation studies.
Underwater explosions and sonar signal behavior are simulated.
Tank & Aircraft Aerodynamics
Arjun & T-90 tanks use CFD for dust flow, heat dissipation, and armor cooling.
Tejas Fighter Jet & AMCA (Advanced Medium Combat Aircraft) use CFD for stealth & aerodynamics optimization.
🖥️ Software & Tools Used in DRDO
ANSYS Fluent & CFX – Used for general missile & aerodynamics analysis.
OpenFOAM & SU2 – Open-source solvers for research & academic collaboration.
DRDO In-house CFD Codes – Special codes for hypersonic & naval simulations.
HPC Supercomputers – "Dhruva" & "Aditya" supercomputers for high-speed calculations.
Many IITs, IISc, and DRDO labs collaborate on CFD-based aerospace & defense research:
🔹 ISRO’s VSSC (Vikram Sarabhai Space Centre) – CFD for rockets & re-entry.
🔹 DRDO’s ADA (Aeronautical Development Agency) – CFD for Tejas & AMCA jets.
🔹 DRDL (Defence Research & Development Laboratory) – Missile CFD research.
🔹 NSTL (Naval Science & Technological Laboratory) – Naval hydrodynamics & submarine CFD.
🔹 IISc Bangalore & IIT Madras – Hypersonics & scramjet simulations using OpenFOAM.
Conclusion
✅ CFD is a critical technology in ISRO & DRDO for aerospace and defense applications.
✅ ISRO uses CFD for rockets, re-entry vehicles, combustion, and thermal analysis.
✅ DRDO applies CFD in missiles, hypersonic weapons, submarines, and UAVs.
✅ India has strong research in CFD, with IITs, IISc, and DRDO labs leading innovation.
Gyan.... Knowledge...Wisdom... my wife Reema reciting her own poem...
Many modern C++ applications provide a Python interface because it combines performance (C++) with ease of use (Python). Here’s why this trend has become so popular:
✔ It allows rapid prototyping. ✔ It combines speed (C++) with flexibility (Python). ✔ Python is popular in AI, ML, and scientific computing. ✔ Users can extend software via Python scripting.
Boost.Python is a powerful library that enables seamless integration between C++ and Python. It allows C++ functions and classes to be exposed to Python, enabling direct interaction between the two languages.
As I was playing around with Boost.Python, I made my existing Factory Pattern project written in C++ to expose itself to the python using Boost.Python library.
The most important part is the following lines of code. This is kind of self explanatory - how we expose the C++ classes and methods to Python code.
// Expose Singleton Factory to Python
BOOST_PYTHON_MODULE(FactoryPattern) {
usingnamespace boost::python;
class_<Food, boost::noncopyable>("Food", no_init)
.def("getName", pure_virtual(&Food::getName));
class_<Biscuit, bases<Food>>("Biscuit")
.def("getName", &Biscuit::getName); // Ensure Biscuit has getName
class_<Chocolate, bases<Food>>("Chocolate")
.def("getName", &Chocolate::getName); // Ensure Chocolate has getName
Fluid simulation is a key area in computer graphics that models the motion and behavior of liquids, gases, and other fluid-like substances. It is highly valuable for careers in VFX, game development, animation, and scientific visualization.
What is Fluid Simulation?
Fluid simulation is the process of using numerical methods to approximate the behavior of liquids and gases. There are two main approaches:
Grid-Based (Eulerian) Simulation
Uses a fixed 3D grid (voxels) to store velocity, pressure, and density.
Common in smoke, fire, and large-scale water simulations.
A B-spline (Basis Spline) is a type of smooth, piecewise-defined curve commonly used in computer graphics, computer-aided design (CAD), and other computational fields. It generalizes Bézier curves by providing greater flexibility and control over the shape of the curve while maintaining important mathematical properties like smoothness and continuity.
Key Properties of B-Splines
Piecewise Polynomial:
A B-spline curve is defined by connecting multiple polynomial segments, ensuring a smooth transition between them.
Control Points:
A B-spline is influenced by a set of control points. These points do not necessarily lie on the curve, but they define its general shape.
Degree (Order):
The degree of the B-spline determines the complexity of the curve segments (linear, quadratic, cubic, etc.).
Higher-degree B-splines produce smoother curves.
Knots:
A knot vector is used to divide the curve into segments and determines how the control points influence the curve. Knots can be uniform (evenly spaced) or non-uniform (custom spacing).
Continuity:
The continuity of a B-spline curve depends on its degree and the knot vector. It ensures smooth transitions between segments (e.g., continuity).
Local Control:
Modifying a control point affects only a portion of the curve, making B-splines highly versatile for designing complex shapes.
Mathematical Definition
A B-spline curve is defined as:
: Control points.
: Basis functions of degree , calculated recursively using the Cox-de Boor recursion formula:
: Parametric value in the range of the knot vector.
Applications of B-Splines
CAD and CAM:
Used for designing and manufacturing complex surfaces and shapes.
Animation:
Smooth interpolation of motion paths or object deformation.
Data Fitting:
Approximate noisy data points with smooth curves.
Computer Graphics:
Modeling free-form curves and surfaces (e.g., NURBS, a special type of B-spline).
Image Processing:
Resampling and interpolation of image data.
Advantages of B-Splines
Greater flexibility than Bézier curves.
Local control ensures efficiency in complex modeling tasks.
Customizable smoothness and continuity.
Can represent a Bézier curve or polynomial curve as a special case.
And here we go... the source code of B-Spline implemented in Javafx...
// Configure the B-spline path bSplinePath.setStroke(Color.BLACK); bSplinePath.setStrokeWidth(2); bSplinePath.setFill(null);
// Add path and points to the pane pane.getChildren().add(bSplinePath); updateBSpline();
// Create the scene Scene scene = new Scene(pane, 600, 400); primaryStage.setTitle("B-Spline Demo"); primaryStage.setScene(scene); primaryStage.show(); }
// Adds a draggable control point private void addControlPoint(Pane pane, double x, double y) { Circle point = new Circle(x, y, 8, Color.RED); point.setStroke(Color.BLACK); point.setStrokeWidth(1); point.setOnMouseDragged(event -> { point.setCenterX(event.getX()); point.setCenterY(event.getY()); updateBSpline(); }); controlPoints.add(point); pane.getChildren().add(point); }
// Updates the B-spline path private void updateBSpline() { if (controlPoints.size() < 4) { bSplinePath.getElements().clear(); // Clear path if not enough points return; }
bSplinePath.getElements().clear();
// Use the de Boor algorithm for cubic B-spline interpolation for (int i = 1; i < controlPoints.size() - 2; i++) { Circle p0 = controlPoints.get(i - 1); Circle p1 = controlPoints.get(i); Circle p2 = controlPoints.get(i + 1); Circle p3 = controlPoints.get(i + 2);
Four pointsP0,P1,P2andP3in the plane or in higher-dimensional space define a cubic Bézier curve. The curve starts atP0going towardP1and arrives atP3coming from the direction ofP2. Usually, it will not pass throughP1orP2; these points are only there to provide directional information. The distance betweenP1andP2determines "how far" and "how fast" the curve moves towardsP1before turning towardsP2.
Writing BPi,Pj,Pk(t) for the quadratic Bézier curve defined by points Pi, Pj, and Pk, the cubic Bézier curve can be defined as an affine combination of two quadratic Bézier curves:
The explicit form of the curve is:
Any series of 4 distinct points can be converted to a cubic Bézier curve that goes through all 4 points in order. Given the starting and ending point of some cubic Bézier curve, and the points along the curve corresponding to t = 1/3 and t = 2/3, the control points for the original Bézier curve can be recovered.
Here's how it looks like - an experimentation...
And here's the source code of the experimentation (JavaFx application)...
public class BezierCurveDemo extends Application {
@Override public void start(Stage primaryStage) { // Main pane Pane pane = new Pane();
// Control points Circle start = createControlPoint(100, 300, Color.RED); // Start point Circle control1 = createControlPoint(200, 100, Color.BLUE); // First control point Circle control2 = createControlPoint(400, 100, Color.BLUE); // Second control point Circle end = createControlPoint(500, 300, Color.RED); // End point // Lines to show the control points Line line1 = new Line(); Line line2 = new Line();
// Add everything to the pane pane.getChildren().addAll(line1, line2, bezierCurve, start, control1, control2, end);
// Create scene and display Scene scene = new Scene(pane, 600, 400); primaryStage.setTitle("Bezier Curve Demo"); primaryStage.setScene(scene); primaryStage.show(); }
// Helper function to create control points private Circle createControlPoint(double x, double y, Color color) { Circle circle = new Circle(8, color); circle.setCenterX(x); circle.setCenterY(y);
// Make control points draggable circle.setOnMouseDragged(event -> { circle.setCenterX(event.getX()); circle.setCenterY(event.getY()); });
return circle; }
public static void main(String[] args) { launch(args); } }