Euler´s equation for inviscid flow

  • Context: Graduate 
  • Thread starter Thread starter texaska
  • Start date Start date
  • Tags Tags
    Flow
Click For Summary

Discussion Overview

The discussion revolves around simulating ideal gas flow in a cube using Euler's equations for inviscid fluid motion in three dimensions. Participants explore the dynamics of heat spreading from a warmed cube to adjacent cubes, addressing the mathematical formulation and physical principles involved in the simulation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes the initial setup of the simulation, including the parameters for the ideal gas and the proposed formula for local and convective acceleration.
  • Another participant suggests that omitting certain terms in the total derivative of velocity may not be appropriate and emphasizes the need to adjust pressure using continuity equations for mass and energy.
  • A different participant argues that the movement of molecules towards higher pressure is physically possible and discusses the implications for the simulation's dynamics.
  • Concerns are raised about the calculation of donated molecules and the time step used in the simulation, with suggestions for smaller time steps to improve numerical stability.
  • One participant proposes a geometric solution for calculating the amount of molecules transferred between cubes, but expresses uncertainty about the correctness of the approach.
  • Another participant provides a revised expression for the number of molecules passing between cubes and emphasizes the importance of summing contributions from neighboring cubes while neglecting diagonal contributions.
  • A later reply stresses the necessity of using consistent physical units in calculations and suggests looking into the Navier-Stokes equations while omitting viscosity terms for inviscid flow.

Areas of Agreement / Disagreement

Participants express differing views on the appropriateness of omitting certain terms in the equations, the calculation of donated molecules, and the choice of time step. The discussion remains unresolved with multiple competing perspectives on the modeling approach.

Contextual Notes

Participants highlight potential limitations in the mathematical formulation, including the dependence on time step size and the need for careful consideration of physical units in the equations.

texaska
Messages
4
Reaction score
0
Hello,
i would like to simulate an ideal gas flow in a cube...the cube consists of small cubes lined next to each other..after warming up one small cube i should describe how is the heat spreading to the rest of the smaller cubes...using eulers equations for inviscid fluid motion 3D..
using the equation of state I count the mass of molecules inside one small cube,a=1m
V=1m3
P=100KPa
T=293.15K
r=8.314
n=PV/rT
n=41.0299mol
------------------------
i warm up one small cube to 293.25K,so the pressure will rise

now according to the equation for axes x

Image66.gif

it should be something like
Vx_new-Vx+(Vx-V(x-1))*Vx=-(Px-P(x-1))/rho
where
Vx_new-Vx=local acceleration
(Vx-V(x-1))*Vx=konvective acceleration
the rest can be neglected cause it is laminar flow
----------------------------
as far as i know the molecules in the cube with higher pressure should move to cubes with lower pressure
------------------------------
the problem is that using this formula the molecules spread also from cubes with lower pressure to cube with higher pressure which is wrong..and i don t know how to twist the formula to prevent that..
-------------------------
so please if u have some experiences with modeling gas flow using there equations or if u see a mistake in my rewritten formula please let me know..
--------------------------
 
Physics news on Phys.org
I think you shouldn't omit the last two summands in the formula for the total derivative of velocity. Also you didn't write how you adjusted the pressure after each time step: you should use continuity equation both for mass and energy (to determine the amount and temperature of the gass in each cell, which are needed to calculate the pressure).
Movement of the molecules towards higher pressure is in fact physically possible, since the pressure only determines the acceleration of the molecules and not the speed: if they have enough speed, then they can move towards higher pressure for some time.
 
Last edited:


I was told that by laminar flow the last two summands can be ommited
the general idea is>
By computing Vx(new) i get the speed of the molecules
Then i take each cube and move it to the right direction
The source cube should donate molecules(warmth) to other cubes
T=T1*n1+T2*n2.../n1+n2...
And then i compute pressure again with new "T" and "n" and do the same in rounds
the heat should spread all over the cube..
The process is described on the picture..I used 2D model

View attachment cube.bmp
 
I don't understand your calculation of donated molecules. Their amount should increase lineary with time step dt, while it seems to be proportional to dt^2 in your formula. I understood that you took 1 s for your time step. That is probably too much (at least while your typical velocity*dt gives the same order of magnitude as box size a): numerical solving of diferential equations works well only for very small time steps (that cause small relative changes of parameters in each step).
I'm still not convinced about the two omited summands in the total derivatives of velocity: maybe you were supposed to define coordinate system with x axes parallel to velocity (at each box)? (then those parts are of course zero)
 
Ok,so i can change the time step to 0.01s for example,can you tell me what your suggestion for computing donation of molecules and heat is?..
i thought that the geometrical soulution is good enough
for 3D:
amouth of molecules in cube/total volume of the cube=
amount of molecules for next cube/volume of the molecules for next cube

n/V=n1/V1
n1=n*V1/V

..the thing is that whether i omit the last two summands or not i still think there is something wrong with that..one thing can be the time step,but it is not the only..
 
The expression for molecules passing from cube [0,0] to [0,1]

nd=n[0,0]*(x1*y1)/a^2 should be replaced by

nd=n[0,0]*(x1*(a-y1))/a^2

If you chose small time step dt then y1<<a and the expression becomes aproximately:

nd=n[0,0]*x1/a

Of course you should sum contributions from all neighbors of each cube in each time step (except diagonal neighbours: their contribution is negligible if you chose small dt, since it is proportional to dt^2).
 
re

thank you so much i see your point..
..i tried to compute something on paper for x-axis only,and that seems to be the biggest problem
take a look
View attachment x_axis.bmp
i don t like the flow..i don t think it is correct..

btw> i appreciate your help
 
Here is a simple, but very important advice: always calculate with physical units!
An equation with different units on different sides (or even at different summands on the same side) is certanly wrong.
Search for Navier-Stokes equation on the internet and ommit the parts multiplied by viscosity (since your gas is inviscid), then try to compose the correct equation by replacing derivatives with finite diferences.

Hint: local acceleration is not really vnew-vold (do you remember the definition of acceleration?). Other parts of the equation must also be corrected to reasonably approximate the partial derivatives with finite diferences.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 48 ·
2
Replies
48
Views
5K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 39 ·
2
Replies
39
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K