Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Supersonic wedge into combustible gas
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jimmy  
View profile  
 More options Aug 27, 10:10 am
From: Jimmy <jimmy.verrea...@mail.mcgill.ca>
Date: Thu, 27 Aug 2009 07:10:49 -0700 (PDT)
Local: Thurs, Aug 27 2009 10:10 am
Subject: Supersonic wedge into combustible gas
I'm a PhD student at McGill University, and I intend to use AMRITA to
investigate different flowfields around a projectile travelling at
hypersonic velocities into a combustible gas.

So far I've been able to run a simulation with a sphere as the
projectile. Here is a part of the script specifying the boundary
conditions:

               fold::amrita { Boundary Conditions
                  import znd::{Dcj}
                  W'quiescent  ::= <RHO=.05,U=0,V=0,P=.05,Z=0>
                  W'freestream  ::= <RHO=1,U=$dp*
($znd::Dcj),V=0,P=1,Z=1>
                  fold::amr_sol'BoundaryConditions{
                     Nbdy  domain: extrapolate
                     Ebdy  domain: extrapolate
                     Wbdy  domain: prescribe   W'freestream
                     Sbdy  domain: reflect
                     fold::amrita { define PSI
                        PSI ::= ($rad-sqrt((X[]-($xo))**2+(Y[]-($yo))
**2))
                     }
                     AXS::InternalBoundary {
                         PSI = PSI[]
                     }
                  }
where the location is specified (xo, yo) and the radius of the sphere
(rad).

Now I would like to run a simulation where the projectile is a wedge.
So instead of specifying a sphere for the body, I would like to
specify a triangle using 3 points for the 3 apex of the triangle. How
can I specify that in the boundary conditions? In other words, what
expression do I have to put for the PSI expression?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles Basenga Kiyanda  
View profile  
 More options Aug 27, 1:36 pm
From: Charles Basenga Kiyanda <c...@lanl.gov>
Date: Thu, 27 Aug 2009 11:36:56 -0600
Local: Thurs, Aug 27 2009 1:36 pm
Subject: Re: Supersonic wedge into combustible gas
Jimmy,

How about trying something as below? It takes into account that you
define the apex of the wedge as $Xa,$Ya, the angle of the top-half of
the wedge, $alphaT, the angle of the bottom half of the wedge $alphaB
and the length of the wedge, $Lr. This will work for a general symmetric
or asymmetric projectile with zero angle of attack. If you want a
projectile with an angle of attack, you'd have to modify this a bit.
This would be a bit more work to define, but it seems (at least to me,
call me pedantic if you will) like the length of the projectile, the
angle(s) of the wedge and the angle of attack are a more natural
coordinate system than three points in space for a triangle.

                 fold::amrita { Boundary Conditions
                    import znd::{Dcj}
                    W'quiescent  ::= <RHO=.05,U=0,V=0,P=.05,Z=0>
                    W'freestream  ::= <RHO=1,U=$dp* ($znd::Dcj),V=0,P=1,Z=1>
                    fold::amr_sol'BoundaryConditions{
                       Nbdy  domain: extrapolate
                       Ebdy  domain: extrapolate
                       Wbdy  domain: prescribe   W'freestream
                       Sbdy  domain: reflect
                       fold::amrita { define PSI
                         d1 ::= cos(rad($alphaT))*(Y[]-$Ya)-sin(rad($alphaT))*(X[]-$Xa)
                          d2 ::=
cos(rad($alphaB))*(Y[]-$Ya)+sin(rad($alphaB))*(X[]-$Xa)
                         d3 ::= d1[]*d2[]
                         proj1 ::= X[]<$Xa? -Y[] : -d3[]
                         PSI ::= X[]>$Xa+$Lr? -Y[] : proj1[]
                       }
                       AXS::InternalBoundary {
                           PSI = PSI[]
                       }
                    }

I was originally a bit baffled by the three points definition of your
shape, but writing the above made me think there's probably a simple
solution. In the following, (Xa,Ya) is the apex and (X1,Y1) and (X2,Y2)
are the other two points. I put this together assuming

Xa < X1 < X2
and
Y1 > Ya > Y2.

I think it would also work for

Y1 > Y2 > Ya.

                 fold::amrita { Boundary Conditions
                    import znd::{Dcj}
                    W'quiescent  ::= <RHO=.05,U=0,V=0,P=.05,Z=0>
                    W'freestream  ::= <RHO=1,U=$dp* ($znd::Dcj),V=0,P=1,Z=1>
                    fold::amr_sol'BoundaryConditions{
                       Nbdy  domain: extrapolate
                       Ebdy  domain: extrapolate
                       Wbdy  domain: prescribe   W'freestream
                       Sbdy  domain: reflect
                       fold::amrita { define PSI
                         db ::= (Y[]-$Ya)*($X2-$Xa)-(X[]-$Xa)*($Y2-$Ya)
                         d1 ::= (Y[]-$Ya)*($X1-$Xa)-(X[]-$Xa)*($Y1-$Ya)
                         d2 ::= (Y[]-$Y2)*($X2-$X1)-(X[]-$X2)*($Y2-$Y1)
                         dL ::= db[]*d1[]
                         dR ::= db[]*d2[]
                         proj1 ::= X[]<$Xa? -Y[] : -dL[]
                         proj2 ::= X[]<$X1? proj1[] : -dR[]
                         PSI ::= X[]<$X2? proj2[] : -Y[]

                       }
                       AXS::InternalBoundary {
                           PSI = PSI[]
                       }
                    }

I make no claim that this will work out of the box. I didn't test it
here and I fear I always get confused with the sign of psi the first
time around. There is a shock interaction with a double wedge in the vki
notes (2nd document, page 5). I believe the ramp mailit is distributed
with amrita, so you should be able to look at that. I base myself off of
that whenever I need to specify obstacles with straight edges.

Charles


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
matei  
View profile  
 More options Aug 27, 2:04 pm
From: matei <ma...@uottawa.ca>
Date: Thu, 27 Aug 2009 11:04:20 -0700 (PDT)
Local: Thurs, Aug 27 2009 2:04 pm
Subject: Re: Supersonic wedge into combustible gas
Jimmy,
I have just uploaded a working script called shockCD_EZ that shows the
problem of a shock passing over a triangle.  Remember that PSI gives
the distance from any grid point to the closest solid boundary.  Based
on this rationale, you can easily construct any desired shape.
matei

On Aug 27, 10:10 am, Jimmy <jimmy.verrea...@mail.mcgill.ca> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Aug 27, 2:33 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Thu, 27 Aug 2009 11:33:03 -0700 (PDT)
Local: Thurs, Aug 27 2009 2:33 pm
Subject: Re: Supersonic wedge into combustible gas
Matei,

On Thu, 27 Aug 2009, matei wrote:

> Jimmy,
> I have just uploaded a working script called shockCD_EZ that shows the
> problem of a shock passing over a triangle.  Remember that PSI gives
> the distance from any grid point to the closest solid boundary.  Based
> on this rationale, you can easily construct any desired shape.
> matei

Your simulation looks fine, but your definition of PSI is actually
incorrect. From the apex of the triangle the level set should appear as a
sector of concentric arcs and not as a sharp corner as you have it. This
sector is bounded by the normals to the front and back sides of
the obstacle.

Jimmy, first try plotting Matei's PSI. You can do this by adding:

   rgb<1,0,0>
   plot PSI[] contours

to the end of the procedure DrawObstacleBody. You should then convince
yourself that the distance to the apex, in the aforementioned sector, is
indeed a series of concentric arcs. When you've done that, try modifying
the PSI function to give the correct distance function. Don't worry if you
get stuck, as I will post a model solution next week. But it's important
that you try it yourself first.

In this particular instance Matei's error in the distance function
is probably unimportant. Nevertheless, for completeness I
thought I should point it out.

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jimmy  
View profile  
 More options Aug 28, 1:09 pm
From: Jimmy <jimmy.verrea...@mail.mcgill.ca>
Date: Fri, 28 Aug 2009 10:09:32 -0700 (PDT)
Local: Fri, Aug 28 2009 1:09 pm
Subject: Re: Supersonic wedge into combustible gas
Thank you all,

I uploaded the working script "Shock_triangle", which produces
concentric circles at the triangle apex for the shortest distance
function.

Let me know if there are other ways of doing it.

Jimmy

On Aug 27, 2:33 pm, James Quirk <j...@galcit.caltech.edu> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Quirk  
View profile  
 More options Aug 28, 4:02 pm
From: James Quirk <j...@galcit.caltech.edu>
Date: Fri, 28 Aug 2009 13:02:34 -0700 (PDT)
Local: Fri, Aug 28 2009 4:02 pm
Subject: Re: Supersonic wedge into combustible gas
Jimmy,

On Fri, 28 Aug 2009, Jimmy wrote:

> Thank you all,

> I uploaded the working script "Shock_triangle", which produces
> concentric circles at the triangle apex for the shortest distance
> function.

> Let me know if there are other ways of doing it.

Your approach is about the best that can be done, although
I would have written the script slightly differently.
For instance, I would lean towards using:

   S1    ::= cos(rad($alpha+90))*(Y[]-$Y2)-sin(rad($alpha+90))*(X[]-($X1+$Y2/tan(rad($al pha))))    
   S2    ::= ($Y2-Y[])                                                                            
   PSI1  ::= -cos(rad($alpha))*(Y[]-$Y1)+sin(rad($alpha))*(X[]-$X1)                                
   PSI2  ::= -sqrt((Y[]-$Y2)**2+(X[]-($X1+$Y2/tan(rad($alpha))))**2)                              
   PSI3  ::= ($X1+$Y2/tan(rad($alpha)))-X[]                                                        
   PSI   ::= S1[]<0 && S2[]<0 ? PSI2[] : min(PSI1[],PSI3[])

where S1 and S2 mark the sector in which one needs to consider the
distance to the apex.

I would then have refactored it to:

   set X2 #= $X1+$Y2/tan(rad($alpha))
   S1    ::= cos(rad($alpha+90))*(Y[]-$Y2)-sin(rad($alpha+90))*(X[]-$X2)                        
   S2    ::= ($Y2-Y[])                                                                            
   PSI1  ::= -cos(rad($alpha))*(Y[]-$Y1)+sin(rad($alpha))*(X[]-$X1)                                
   PSI2  ::= -sqrt((Y[]-$Y2)**2+(X[]-$X2)**2)                                                      
   PSI3  ::= $X2-X[]                                                                              
   PSI   ::= S1[]<0 && S2[]<0 ? PSI2[] : min(PSI1[],PSI3[])

which, with the aid of complex variables,  can then be reduced to:

   set alpha = rad($alpha)                                                                      
   set X2   #= $X1+$Y2/tan($alpha)                                                                
   Z    ::= {X[]-$X2,Y[]-$Y2}                                                                    
   S1   ::=  Im(Z[]*exp({0,PI+$alpha})))                                                          
   S2   ::= -Im(Z[])                                                                              
   PSI1 ::=  Im(Z[]*exp({0,PI-$alpha}))                                                          
   PSI2 ::= -abs(Z[])                                                                            
   PSI3 ::= -Re(Z[])                                                                              
   PSI  ::= S1[]<0 && S2[]<0 ? PSI2[] : min(PSI1[],PSI3[])  

James


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google