CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Projectile shockwave in 2d using Roe solver? General discussion...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2013, 19:55
Question Projectile shockwave in 2d using Roe solver? General discussion...
  #1
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13
massive_turbulence is on a distinguished road
I'm trying to solve a simple model graphically in 2 dimensions where a bullet traveling faster than sound moves to the right along the x-axis and generates shock waves around itself. So far I understand that a Roe solver is used to calculate the fluxes on the edges of adjacent cells and I'm working with the code on this site called twod_euler_fluxes_v2.f90. I'm actually good with C/C++ so I decided to convert the Fortran code to something more easily readable (in my own taste). The question I have ultimately asks how do I...

1.Setup the initial grid. With the bullet having different attributes (e.g. density) compared to the "medium" (Air is the medium in this case).

2. How would I update the grid. Do I basically check every cell in one timestep and update the bullet a certain position (maybe one cell per time step). I'm thinking that using a simple array called GRID[100][100] would be looped over within a nested double for loop?

Forgive me for being a noob.
massive_turbulence is offline   Reply With Quote

Old   May 14, 2013, 04:21
Default
  #2
Senior Member
 
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 16
michujo is on a distinguished road
Hi. Here's what I think:

1) The bullet is not a fluid, therefore you do not solve any equations inside it. The mesh encompasses the fluid domain and surrounds the bullet, which define the inner boundaries of the fluid domain, and where you must define wall boundary conditions.

2) There's no need to update the mesh. If you set a reference frame on the bullet, the problem becomes steady-state.

Cheers,
Michujo.
michujo is offline   Reply With Quote

Old   May 15, 2013, 03:34
Default
  #3
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13
massive_turbulence is on a distinguished road
Quote:
Originally Posted by michujo View Post
Hi. Here's what I think:<br />

1) The bullet is not a fluid, therefore you do not solve any equations inside it. The mesh encompasses the fluid domain and surrounds the bullet, which define the inner boundaries of the fluid domain, and where you must define wall boundary conditions.<br />
So the bullet then gets updated and its inside an enclosed boundary within the fluid. But how do I setup boundary conditions for the Fortran code. What input do I use for uL, uR to get the Roe variable output for the boundaries? Heres the actual code used in twod_euler_fluxes_v2.f90.

Code:
real :: uL(4), uR(4) !  Input: conservative variables rho*[1, u, v, E]
 real :: nx, ny       !  Input: face normal vector, [nx, ny] (Left-to-Right)
 real :: Roe(4)       ! Output: Roe flux function (upwind)
Notice its upwind, does that make a difference in what direction the bullet moves?

Quote:
2) There's no need to update the mesh. If you set a reference frame on the bullet, the problem becomes steady-state.<br />
Michujo.
Okay but somehow the "mesh" has to be computed over and the flux has to calculated at every point... no?
massive_turbulence is offline   Reply With Quote

Old   May 15, 2013, 19:59
Default
  #4
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13
massive_turbulence is on a distinguished road
I wanted to add this image from this site to show what the problem should look like.
Attached Images
File Type: jpg anim.jpg (920 Bytes, 8 views)
massive_turbulence is offline   Reply With Quote

Old   May 16, 2013, 08:00
Default
  #5
Senior Member
 
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 16
michujo is on a distinguished road
Hi, I am not sure to understand your problem.

Being the fluid flow stationary with respect to the bullet, the mesh does not need to be recomputed at every time step. Only the fluid flow will be calculated until convergence. At the walls of the bullet the fluid velocity is zero (no-slip boundary condition) in the reference frame you used (travelling with the bullet).

The upwind scheme works no matter the direction in which the bullet is travelling (or the fluid with respect to the bullet in your problem). The scheme will always take the right upstream value locally.

Cheers,
Michujo.
michujo is offline   Reply With Quote

Old   May 18, 2013, 19:37
Default
  #6
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13
massive_turbulence is on a distinguished road
Quote:
Originally Posted by michujo View Post
Hi, I am not sure to understand your problem.
You've been very helpful thanks.

Quote:
Being the fluid flow stationary with respect to the bullet, the mesh does not need to be recomputed at every time step. Only the fluid flow will be calculated until convergence. At the walls of the bullet the fluid velocity is zero (no-slip boundary condition) in the reference frame you used (travelling with the bullet).
But the bullet is moving correct? The bullet is part of the mesh or its just a boundary within the mesh... I guess if the latter is true then only the bullet is updated. I still don't see why the fluid part of the mesh would not need to be updated with every change in motion of the bullet though. If you look at the animation it seems that the area around the projectile is updated with the projectile moving through the fluid?

What I mean by updating is that the flux is determined for every single fluid cell and solved using a matrix based on the previous state of each cell because the bullet is moving through the system...

Quote:

The upwind scheme works no matter the direction in which the bullet is travelling (or the fluid with respect to the bullet in your problem). The scheme will always take the right upstream value locally.

Cheers,
Michujo.
That solves that.
massive_turbulence is offline   Reply With Quote

Reply

Tags
projectile, roe solver, shockwave, two-dimensions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
general discussion on UDF in Fluent doki FLUENT 0 October 13, 2008 08:57
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08
CFX 5.5 Roued CFX 1 October 2, 2001 17:49
Roe scheme for general equation of state zouchu Main CFD Forum 3 August 10, 2000 17:46
Eigenvalues & Eigenvectors in General Geometries for 3-D TVD Solver Axel Rohde Main CFD Forum 3 October 6, 1999 15:48


All times are GMT -4. The time now is 07:07.