Friday, December 26, 2025

OpenFOAM: forwardStep

Friday 26 December 2025

This is about the tutorial forwardStep in OpenFOAM. Geometry defined in Fig. 1 and the tree structure in Fig. 2.


Fig. 1. Geometry


Fig. 2. Tree structure

Need to execute the following commands:

blockMesh        // To create the mesh
checkMesh       // To check the mesh ok
touch foam.foam
sonicFoam        // To simulate
foamToVTK     
paraview foam.foam &







Saturday, December 20, 2025

Cloud Computing: An Overview

Sunday 21 December 2025

As the Fall 2025 semester final examinations are approaching, we are now concluding our graduate-level course on Cloud Computing. An overview image shows the topics that are part of the course. The course is designed to cover the basics (knowledge) and aims to develop essential skills toward a readiness to work with cloud services, especially from top vendors like Amazon, Google, and Microsoft. In my opinion, the course is a first step towards a vast era of IT-enabled business.






Ref. Textbook

The Cloud Computing Book: The Future of Computing Explained 1st Edition by Douglas Comer,  Chapman and Hall/CRC, (July 1, 2021),‎ 288 pages, ISBN-10: 0367706806, ISBN-13: 978-0367706807


Wednesday, December 10, 2025

Gmsh to Create elbow.msh and Use it in OpenFOAM Tutorial

Friday 05 December 2025

It is interesting to think about and create the elbow geometry in Gmsh for the 2D elbow mesh. Figure 1 shows the drawing [1]. 


Fig. 1. The drawing of the elbow [1]


// elbow_new.geo
Point(1) = {0, 4.54, 0, 1.0}; Point(2) = {32, 4.54, 0, 1.0};
Point(3) = {52.54, 20.54, 0, 1.0}; Point(4) = {52.54, 0, 0, 1.0};
Point(5) = {56.54, 0, 0, 1.0}; Point(6) = {56.54, 20.54, 0, 1.0};
Point(7) = {64, 36.54, 0, 1.0}; Point(8) = {64, 68.54, 0, 1.0};
Point(9) = {48, 68.54, 0, 1.0}; Point(10) = {48, 36.54, 0, 1.0};
Point(11) = {32, 20.54, 0, 1.0}; Point(12) = {0, 20.54, 0, 1.0};
Line(1) = {1, 2}; // Line(2) = {3, 4}; Line(3) = {5, 6};
Line(4) = {7, 8}; Line(5) = {8, 9}; Line(6) = {9, 10};
Line(7) = {11, 12}; Line(8) = {1, 12}; Line(9) = {4, 5};
//
Point(13) = {32, 36.54, 0, 1.0};
Circle(10) = {11, 13, 10}; Circle(11) = {2, 13, 7};
//
Line(2) = {3, 4}; Line(3) = {5, 6};
Coherence;
//
Delete {
  Point{13}; Curve{11}; Curve{14}; Point{14}; Point{17}; Curve{16}; 
}
//
Curve Loop(1) = {15, 12, 9, 13, 17, 4, 5, 6, -10, 7, -8, 1};
Plane Surface(1) = {1};
//
Extrude {0, 0, 1} {
  Surface{1}; 
}
//
Physical Surface("velocity-inlet-5", 42) = {12};
Physical Surface("velocity-inlet-6", 43) = {4};
Physical Surface("pressure-outlet-7", 44) = {8};
Physical Surface("wall-4", 45) = {9, 10, 3, 5, 2, 11, 13};
Physical Surface("wall-8", 46) = {6, 7};
Physical Surface("frontAndBackPlanes", 47) = {14, 1};
Physical Volume("elbow-new", 49) = {1};
// uniform triangular 
mesh_size = 2.0;
Mesh.RecombineAll = 0; // 0 for triangles, 1 for quads
Mesh.Algorithm = 6; // 6 for triangles, 8 for quads
Mesh.CharacteristicLengthMin = mesh_size;
Mesh.CharacteristicLengthMax = mesh_size;
Mesh.CharacteristicLengthExtendFromBoundary = 0;
//
Mesh 3;


Fig. 2. The 2D elbow mesh created in Gmsh

Exported from Gmsh as elbow_new.msh, See Fig. 3, with option 'Save parameteric coordinates.'


Fig. 3. Mesh exported from Gmsh to use in OpenFoam

Files copied from the elbow tutorial to a new folder elbow_new created for this purpose. 


Fig. 4. Tree structure of the elbow_new folder

Execute the commands gmshToFoam elbow_new.msh and checkMesh. Ensure the Mesh OK and a new folder polyMesh in the constant folder.


Fig. 5. Converting mesh from Gmsh format to OpenFOAM

Execute the commands icoFoam and then foamToVTK. To visualize the simulation execute the command paraview foam.foam &. To create the foam.foam use the command touch foam.foam.


Fig. 6. Visualize the simulation

As a final step, select Plot over Time from Filter / Data Analysis and click on Apply. Need to make a few changes in the Properties for the plot. 


Fig. 7. Plot over Time



[1] https://www.tfd.chalmers.se/~hani/kurser/TMEX02_2007/Gambit/tg02.htm

Learning Point
  • For p and U in folder 0, use type slip; for frontAndBackPlanes 

Sunday, December 7, 2025

Undergraduate Biomedical Engineering Final Year Design Projects 2025-2026

Monday 08 December 2025

BE Biomedical Engineering FYDP 2025-2026

Stream 1. Computational Fluid Dynamics in Blood Flow

These projects involve foundational Computational Fluid Dynamics (CFD) modeling using commercial or open-source software (like ANSYS Fluent, OpenFOAM, or even MATLAB-based fluid simulators).

Project 1.1. CFD Analysis of Carotid Artery Stenosis

Model steady-state blood flow through a simplified, idealized carotid artery with varying degrees of stenosis (narrowing). Calculate and visualize the change in pressure drop and Wall Shear Stress (WSS) as the narrowing increases from 30% to 70%. Relate results to the risk of plaque rupture. 

Project 1.2. Aortic Coarctation Hemodynamics

Simulate flow through a simplified aortic coarctation (a congenital narrowing of the aorta). Compare the velocity profiles and turbulence levels upstream and downstream of the coarctation. Determine the optimal mesh resolution required for accurate turbulence modeling.

Project 1.3. Non-Newtonian Fluid Model in Small Vessels

Investigate the effect of modeling blood as a non-Newtonian fluid (e.g., using the Casson or power-law model) versus a simple Newtonian fluid in a small capillary or arteriole. Perform 2D simulations for both models and quantify the difference in the velocity profiles and viscosity distribution.

Steam 2. Cyber Physical Systems (CPS) in Medical IoT

These projects focus on integrating physical medical devices with computational and network infrastructure, typical of Medical Internet of Things (MIoT).

Project 2.1. Smart Vitals Monitoring Patch (CPS Design)

Design and prototype a low-power, integrated system for continuous monitoring of basic vitals (e.g., heart rate, skin temperature). Physical System: Select and integrate appropriate sensors (e.g., ECG, PPG, thermistor). Cyber System: Develop embedded software (e.g., using Arduino/Raspberry Pi) for data acquisition and local processing. Connectivity: Implement a basic wireless communication protocol (Bluetooth/Wi-Fi) to stream encrypted data to a mobile application or cloud service (the "cyber" layer).

Project 2.2. Intelligent Drug Dispenser with Inventory Tracking

Develop a prototype for a smart medication dispenser that tracks user adherence and monitors the remaining pill inventory. Use weight sensors or optical sensors to detect dispensing events and inventory level. Integrate a real-time clock and a notification system (e.g., LED lights, buzzer, or SMS/email alerts via a gateway) to prompt the user and report non-adherence.

Project 2.3. Wearable Fall Detection and Alert System

Create a CPS that detects a patient fall and automatically alerts a caregiver. Use an accelerometer/gyroscope on a wearable device to detect the characteristic motion pattern of a fall. Implement a robust signal processing algorithm (e.g., thresholding, machine learning classification) and integrate the system with a communication module to send geo-location data and an alert message.

Steam 3.  Quantum Computing in Biosensors (Conceptual/Simulated)

Given the complexity and hardware requirements of true quantum computing, undergraduate projects in this area typically focus on simulating quantum concepts or applying quantum-inspired algorithms to biosensing data.

Project 3.1. Quantum-Inspired Optimization for Sensor Placement

Apply a quantum annealing or quantum-inspired optimization algorithm(simulated on a classical computer) to solve a complex optimization problem in biosensor design, such as optimal placement of sensors on the body or within a microfluidic chip. Formulate the sensor placement as an Ising model or Quadratic Unconstrained Binary Optimization (QUBO) problem and use an open-source library (like D-Wave's Ocean tools or similar classical simulators) to find the best configuration.

Project 3.2. Modeling of a Quantum Dot Biosensor (Focus on Sensing Mechanism)

Develop a theoretical or computational model for a Quantum Dot (QD)-based biosensor to analyze how its quantum properties (e.g., photoluminescence spectrum) change upon binding with a target molecule (e.g., a specific protein). Use computational chemistry or quantum mechanical simulation tools (like Gaussian, VASP, or simpler online tools) to model the energy levels and optical properties of the QD with and without the binding analyte.

Project 3.3. Quantum Machine Learning for ECG Classification (Simulated) 

Implement a simulated Quantum Machine Learning (QML) algorithm, such as a Quantum Support Vector Machine (QSVM), to classify simple ECG patterns (e.g., normal vs. atrial fibrillation). Use an open-source quantum programming framework (like Qiskit or Cirq) to train a small-scale model on a simplified dataset of pre-processed ECG features, demonstrating the potential for quantum speedup in medical diagnostics.