HeadlinesBriefing HeadlinesBriefing 12 languages

How to Use a PINN for a Navier-Stokes Inverse Problem

Towards Data Science ·

🇬🇧 English

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

View original article →


🇸🇦 العربية

PINN يحل تدفق الدم العكسي لمعادلات نافير-ستوكس

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

هل يمكن لـ PINN استعادة تدفق الدم من بيانات السرعة النادرة والضوضاء؟

نعم، يمكن لـ PINN تم إنشاؤه من الصفر باستخدام PyTorch إعادة بناء السرعة والضغط واللزوجة وجهد القص على الجدار من 40 قراءة سرعة مضطربة في شريان ضيق.

العربية version →


🇧🇩 বাংলা

PINN নেভিয়ার-স্টোকস উল্টো রক্ত প্রবাহ সমাধান করে

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

ক्या PINN সparse শোরযুক্ত বেগ ডেটা থেকে রক্ত প্রবাহ পুনরুদ্ধার করতে পারে?

হ্যাঁ, একটি স্ক্র্যাচ-থেকে PyTorch PINN সংকুচিত ধমনীর 40 শোরযুক্ত বেগ পাঠ থেকে বেগ, চাপ, ভিসকোসিটি এবং দেয়ালের শিয়ার তনাবার পুনরুদ্ধার করতে পারে।

বাংলা version →


🇩🇪 Deutsch

PINN löst den umgekehrten Blutfluss der Navier-Stokes-Gleichungen

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

Kann ein PINN den Blutfluss aus spärlichen, rauschhaften Geschwindigkeitsdaten rekonstruieren?

Ja, ein von Grund auf neu aufgebautes PyTorch-PINN kann die Geschwindigkeit, den Druck, die Viskosität und die Wandscherspannung aus 40 rauschhaften Geschwindigkeitsmessungen in einer verengten Arterie rekonstruieren.

Deutsch version →


🇪🇸 Español

PINN resuelve el flujo sanguíneo inverso de Navier-Stokes

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

¿Puede un PINN recuperar el flujo sanguíneo a partir de datos de velocidad escasos y ruidosos?

Sí, un PINN de PyTorch construido desde cero puede reconstruir la velocidad, la presión, la viscosidad y el esfuerzo cortante de la pared a partir de 40 lecturas de velocidad ruidosas en una arteria estrecha.

Español version →


🇫🇷 Français

PINN résout le flux sanguin inverse de Navier-Stokes

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

Un PINN peut-il récupérer le flux sanguin à partir de données de vitesse rares et bruitées ?

Oui, un PINN PyTorch construit from-scratch peut reconstruire la vitesse, la pression, la viscosité et la contrainte de cisaillement pariétal à partir de 40 lectures de vitesse bruitées dans une artère rétrécie.

Français version →


🇮🇳 हिन्दी

PINN ने नावियर-स्टोक्स उल्टा रक्त प्रवाह हल किया

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

क्या PINN सparse शोरयुक्त वेग डेटा से रक्त प्रवाह को पुनः प्राप्त कर सकता है?

हां, एक से-स्क्रैच PyTorch PINN संकरी धमनी में 40 शोरयुक्त वेग पाठ्यांक से वेग, दबाव, चिपचिपापन और दीवार कतरन तनाव का पुनर्निर्माण कर सकता है।

हिन्दी version →


🇮🇩 Bahasa Indonesia

PINN Menyelesaikan Aliran Darah Terbalik Navier-Stokes

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

Bisakah PINN memulihkan aliran darah dari data kecepatan yang langka dan berisik?

Ya, PINN yang dibangun dari nol menggunakan PyTorch dapat merekonstruksi kecepatan, tekanan, viskositas, dan tegangan geser dinding dari 40 pembacaan kecepatan berisik dalam arteri yang menyempit.

Bahasa Indonesia version →


🇯🇵 日本語

PINNがナビエ-ストークス方程式の逆問題である血流を解く

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

PINNは疎なノイズを含む速度データから血流を復元できますか?

はい、ゼロから構築されたPyTorchのPINNは、狭まった動脈からの40個のノイズを含む速度測定値から、速度、圧力、粘度、および壁せん断応力を復元できます。

日本語 version →


🇧🇷 Português

PINN resolve o fluxo sanguíneo inverso de Navier-Stokes

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

Um PINN pode recuperar o fluxo sanguíneo a partir de dados de velocidade esparsos e ruidosos?

Sim, um PINN de PyTorch construído do zero pode reconstruir a velocidade, a pressão, a viscosidade e o esforço de cisalhamento da parede a partir de 40 leituras de velocidade ruidosas em uma artéria estreita.

Português version →


🇷🇺 Русский

PINN решает обратную задачу кровотока по уравнениям Навье-Стокса

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

Может ли PINN восстановить кровоток из разреженных зашумленных данных скорости?

Да, PINN, построенный с нуля на PyTorch, может восстановить скорость, давление, вязкость и напряжение сдвига на стенке из 40 зашумленных измерений скорости в суженной артерии.

Русский version →


🇨🇳 简体中文

PINN 解决纳维-斯托克斯逆向血流问题

A from-scratch PyTorch build recovers blood flow, viscosity, and wall shear stress in a narrowed artery from 40 noisy velocity readings.

Wall shear stress is the friction blood puts on the wall of a vessel. It is tied to where plaque builds up, and it is hard to measure directly. A physics-informed neural network (PINN) is a natural fit. I built one in plain PyTorch, without DeepXDE or any other PINN library, for a 2D artery with a narrowing (a stenosis). From 40 velocity readings it reconstructs the velocity and pressure fields and the region of reversed flow behind the narrowing. It also works out the viscosity of the fluid, which I treated as unknown, and its wall shear stress follows the CFD reference closely.

The artery is a 2D channel of height H with a smooth bump on the lower wall that blocks half of the opening, a 50% stenosis. The flow is incompressible Navier-Stokes at a Reynolds number of 200. In these units the kinematic viscosity is 0.005. To score a reconstruction you need to know the right answer, so I generated it. A Navier-Stokes solver I wrote computes the steady flow, and the PINN only ever gets a few noisy readings taken from that solution. The noise is Gaussian, at 7% of the inlet velocity.

The network is a plain MLP with 6 layers of 32 tanh units, about 5,500 weights. It uses tanh because the momentum equation needs second derivatives of the output. The inputs are rescaled to the range -1 to 1 inside the network, so autograd still differentiates with respect to the physical coordinates. This is the first article in a series about PINNs for blood flow.

PINN 能否从稀疏噪声速度数据中恢复血流?

是的,从零构建的 PyTorch PINN 可以从狭窄动脉中的 40 个噪声速度读数中重建速度、压力、粘度和壁剪切应力。

简体中文 version →