11
$\begingroup$

Does anyone know or can provide any examples how fluid flow problem can be formulated and solved in Wolfram Language? Simplest cases of 1D or 2D flows based on Navier-Stokes equations or even their linearized version would be great to see.

$\endgroup$
3

1 Answer 1

16
$\begingroup$

This blog is a good start:

Using Mathematica to Simulate and Visualize Fluid Flow in a Box

It fully solves 2D problem of one moving boundary

enter image description here

and gets nice vertex flows:

enter image description here

enter image description here

There are detailed descriptions of proper equations and numerical discretization. You can generalize to 3D. I would look also in latest V10 functionality to see if anything can be used there to upgrade the methods of the blog - it was written before V10 came out. For instance, take a look at this Stokes Flow example which is a simplification of NS:

enter image description here

The same example is discussed in Solving Partial Differential Equations with Finite Elements tutorial

enter image description here

that goes a bit further and solves for pressure and other quantities:

enter image description here

$\endgroup$
5
  • $\begingroup$ In routine maintenance I was preparing to delete this old closed question but I noticed your answer of general interest. Since this question is otherwise abandoned would you please consider editing it to specifically fit this answer, or reposting this to a self-Q&A? $\endgroup$
    – Mr.Wizard
    Jul 25, 2015 at 13:48
  • $\begingroup$ @Mr.Wizard I edited the question, also added a new link and images in the answer at the end. Hope it'll do. $\endgroup$ Jul 26, 2015 at 4:47
  • $\begingroup$ Did you vote to reopen? $\endgroup$
    – Mr.Wizard
    Jul 26, 2015 at 10:59
  • $\begingroup$ @Mr.Wizard I do not see an option for this. $\endgroup$ Jul 26, 2015 at 11:15
  • $\begingroup$ I have trouble remembering the details of site mechanics; perhaps you cannot vote to reopen since you voted to close originally. I'll just reopen directly. $\endgroup$
    – Mr.Wizard
    Jul 26, 2015 at 11:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.