Insert New
Slide
​
Roboto
A
Slide Break Defaults…
​
Cell Actions
Window Options
Start Presentation
▼
100%
Slide
1
of
12
​
​

PDE Workflows in Mathematica That Scale with Your Team

Safi Ahmed, School of Mechanical and Manufacturing Engineering, NUST, Pakistan
#WolframTechConf
Slide
2
of
12
​
​

ABSTRACT


  • The talk offers a PDE modeling pattern that can cut development time and lower onboarding costs for engineering and research teams using Mathematica.
  • 
  • Attendees receive ready-to-use notebooks they can adapt to their own simulations in areas like thermal systems, porous media, and biomedical flows.
  • 
  • Link to presentation notebook and materials: https://safiahmed.me/#wtc25​
    ​
  • Slide
    3
    of
    12
    ​
    ​

    Consider this PDE modeling challenge

    If you are in an engineering org or team involved in computation, you will note that not all parts of your model follow the same physics
    ​
    ​​​​Fuelfiltersystem(with​​valve-controlledoutlet)
    ​​​​Heatflowacrossan​​automotiveradiator
    ​​​​Intertitialflowin​​humanliver
    ​

    ​
    ​If different parts of your system follow different physical laws,
    no single PDE can capture it all.​
    ​

    Slide
    4
    of
    12
    ​
    ​

    What NDSolve Can (and Can’t) Do

    ​

    WhatNDSolvedoeswell
    Whereitgetstricky
    ​​
    ​​
    ​​
    ​​
    ​​​​
    -NDSolvehandlesuniformphysics​​beautifully
    -If[...]statementsflyingeverywhere​​-Boundaryconditionsgetcomplicated

    
  • Things get messy fast when:
  • 
  • Your model needs more than one PDE, or
  • 
  • There are different PDEs governing different regions of your system
  • Slide
    5
    of
    12
    ​
    ​

    What If You Could Model Smarter (and Not Harder)?

    PDE Components:

    
  • Wolfram Language has built-in PDE components (like FluidFlowPDEComponent and HeatTransferPDEComponent).
  • 
  • A PDE component related to your problem may not yet exist in Wolfram Language.
  • 
  • However, it does not mean that your problem not be modeled using Wolfram Language (you could explicitly write down your PDE model)
  • 
  • You can instead define a custom PDE component that makes your code more modular.
  • 
  • This modularity:
  • 
  • Allows for a very elegant model for a complex system e.g. Navier-Stokes PDE for free flow and Brinkman PDE for porous flow
  • 
  • Makes your code scalable to further problems (and facilitate reuse)
  • ​
    ​
    Slide
    6
    of
    12
    ​
    ​

    This Modeling Strategy Applies Across Domains

    ​
    In each of these examples, different regions obey different physics. The challenge is the same: how do we model them in a way that is elegant and adaptable for teams?
    ​
    ​
    Slide
    7
    of
    12
    ​
    ​

    How it Looks Like in Action

    Note:

    
  • Explicitly used Navier–Stokes for the free flow region, Brinkman for the porous region
  • 
  • The model works, but the code isn’t modular -- If[...] statements flying everywhere
  • Consequence:

    
  • If I want to scale this model
  • 
  • to share it with a colleague
  • 
  • to reuse in a different project
  • 
  • or even to extend this PDE model within the same project
  • ...it won’t scale well
    ​
    Slide
    8
    of
    12
    ​
    ​

    Experimenting with Different Modeling Approaches

    Approach 1. What if we replace the manual Navier–Stokes equations with the built-in FluidFlowPDEComponent

    A good thing to note:

    
  • How we have defined the physical quantities
  • 
  • Since it now uses the built-in components of Mathematica (optimized by the team of experts at Wolfram Research), the speed is rarely a concern.
  • The code is not only shorter and easier to read,
    but also cleaner and ready to scale
    to new projects,
    to new team members (and existing ones),
    to supervisors...​
    ​

    However, we also note:

    
  • Our model has two different PDEs
  • Slide
    9
    of
    12
    ​
    ​
    Approach 2. Enter BrinkmanPDEComponent...

    The idea

    The PDE component we built

    Provided as one of the Tier 1 examples ( safiahmed.me/#wtc25 )​
    ​

    The resulting code (comparison)

    Provided as one of the Tier 1 examples ( safiahmed.me/#wtc25 )​
    ​

    Note:

    
  • Numerical inconsistencies at the interface
  • 
  • Likely due to structural differences between the built-in and the custom component
  • 
  • However, the solution
  • 
  • is stable,
  • 
  • converges well, and
  • 
  • remains insightful for practical use.
  • 
  • While demonstrated in a straight channel, this pattern could extend to more general geometries.
  • Slide
    10
    of
    12
    ​
    ​

    Ready-to-Use Tools

    Tier 1 : Core components (paclet-style bundle)

    ​
    ​Tier 1 materials an be downloaded at safiahmed.me/#wtc25

    ​
    Tier 2: Create your own...

    ​
    The Tier 1 bundle offers a clean starting point for those interested in creating models in their domains
    
  • Heat exchanger 🌡
  • 
  • Filter system 🧪
  • 
  • Tissue scaffold 🧬
  • Slide
    11
    of
    12
    ​
    ​

    This Modeling Pattern Scales with People

    What this means:

    
  • The student or team member working on this model, if they graduate or leave, the model won’t walk out with them
  • 
  • If you need to onboard a new person into a working simulation, you do that in days and not weeks
  • 
  • Finally, this way of coding means you spend less time debugging, and more time discovering 💡
  • ​
    Slide
    12
    of
    12
    ​
    ​

    I’d Love to Hear What You’re Working On

    If this talk sparked something for you, I’d love to hear about it!
    🌐Presentation materials: safiahmed.me/#wtc25
    Thank you for being here!
    ​
    I’m happy to keep the conversation going in QnA and the various Office Hours
    ​