Thank you, Vitaliy! I’m trying to pass two tests for the cylinder, which are described above, using nonlinear FEM. I will report the results here.
Thanks for the 2D flow simulation around the cooled cylinder, Alexander.
Would you be able to send me the Mathematica code that you used?
Thanks,
Ron
In the attached file, the code for version 11.01 is using linear FEM . I can rewrite the code for version 12 using non-linear FEM to reduce the time.
TRe1000.nb (12.1 MB)
Using the nonlinear solver would be great indeed, Alexander!
Cheers,
Ron
Hi Alexander,
I get the following error while trying to run the code using version 12. How can i fix it?
NDSolveValue::overdet: There are fewer dependent variables, {[Rho][x,y]}, than equations, so the system is overdetermined.
Set::shape: Lists {UX[i],VY[i],[CapitalRho][i]} and NDSolveValue[<<1>>] are not the same shape.
########
Thanks!
gr
airfoil.nb (1.83 MB)
I debugged the code. The file is attached. In version 12, the solution diverges on the right border, although in version 11 the solution converges.
airfoil.nb (5.32 MB)
Hi Alexander,
Yes, the streamflow looks like a mess in V12 as attached. Any idea why such a case and how would i be able to get the right flow?
Thank, appreciate it.
GR
airfoil-v12.nb (13.1 MB)
I have this test running successfully on version 12. What is your version? Use $Version.
“12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)”
Under the DFG Priority Research Program Flow Simulation on High Performance Com- puters solution methods for various flow problems have been developed
Someone above said “interesting to use old book equations and have mathematica show it” … the above paper cited is not “old”. Infact it does mostly to notate the speed of methods not show how it is solved (meaning, how to solve it).
My request is this. This is a great post for anyone to see. But “for the rest of us” it should be said at the beginning of the post if this is a heat conservation equations (or set of) or fluid flow conservation, if solved by fem instead system of pde matrix (if a choice), if this is heat flowing around a circular obstruction (what is the round thing, has it a temperature or it is a fluid obstruction) … you know.
In other words for us beginners, please explain in english what we are physically representing / seeing and discuss if FEM is the only Mathematica solution, or if, say, monte carlo might be be easier and still show a plot (what do we get by using fem?). Explain setting up problem maybe (well, maybe a little complicated for that).
The cited .pdf file uses language which not everyone is going to know, like “laminar flow”. on 2nd reading I see just above equations “fluid” is mentioned in just one sentence, easy to miss.
OK! I will try to create a more robust algorithm. In this version, you can try t0=1/100.
These are routine tests that I did for Mathematica FEM in version 11 using a special time integration algorithm that I am testing. Surprisingly, the tests were passed both in the problem of covection and in the problem of flow around a cylinder (these tests are quite complex and not every method can be used). I demonstrated other applications of the method on https://mathematica.stackexchange.com/
Hi Alexander,
Two quick questions:
-
Would it be possible to replace the cylinder by a square rod and still get a meaningful result? Or does this raise the turbulence to a level that either drives the CPU time to crazy values, or else becomes unstable?
-
Can Mathematica 12.1 also solve the unsteady compressible flow problem with temperatures in 3D (the problem with the cold cylinder and then computing several time steps, as you demonstrated further above)?
Cheers,
Ron
Hi,
Sorry, I already found it myself in the Wolfram online list of new features in Version 12:
3D Transient Fluid Flow and Energy Transport
Amazing!
Cheers, Ron
The latest versions of Mathematica allows as to calculate convection even with Ra=10^7. Data below has been computed with the code in the attached file. It takes a time to finish computation at t=1. Code has been developed by Lion Sahara and debugged here in my answer. In the picture below shown velocity field animated with step dt=0.01. We see the turbulent like convection

.
Discussion and full code here:
Convection of air with higher Rayleigh number
https://community.wolfram.com/groups/-/m/t/3115061
Thank you very much. This is very helpful.
Here we give three tests for the problem of natural convection of air in a rectangular cavity with a Rayleigh number of Ra=10^4 and with the time-fractional derivative \partial_t^{\alpha} in the Caputo sense.
Full post here: https://community.wolfram.com/groups/-/m/t/3474589