Thursday, October 27, 2011

ACSI Update: 2D Diffusion Solver

In an effort learn the Fortran programming language and implement numerical solutions to PDEs, I have written a program to solve 2D diffusion problems. The user must define a computational domain for the solution and specify boundary and initial conditions. This is a major step towards implementing a fully functional CFD scheme.

      PROGRAM DiffusionSolver2
      !Numerically solves the PDE: Ut = alpha^2 * (Uxx + Uyy)
      IMPLICIT NONE
      DOUBLE PRECISION U(101, 101, 1001), X(101),
     .Y(101), T(1001)
      DOUBLE PRECISION alpha, Tmax, Xmax, Ymax, dx,
     .dy, dt, Uxx, Uyy, Rx, Ry,
     .top, bottom, left, right, initial
      INTEGER i, j, k, Imax, Jmax, Kmax
    
      alpha    = .1        !Choose an alpha
      Xmax    = 1.0        !Define the x domain of the solution
      Ymax    = 1.0        !Define the y domain of the solution
      Tmax    = 1.0        !Define the t domain of the solution
      Imax    = 20        !Specify the number of x finite elements < 101
      Jmax    = 20        !Specify the number of y finite elements < 101
      Kmax    = 50        !Specify the number of t finite elements < 1001
     
      dx = Xmax / (Imax-1)
      dy = Ymax / (Jmax-1)
      dt = Tmax / (Kmax-1)
      Rx = dt * alpha**2 / dx**2
      Ry = dt * alpha**2 / dy**2
     
      !setting up the grids
      DO i=1, Imax
          X(i) = (i - 1) * dx
      END DO
      DO j=1, Jmax
          Y(j) = (j - 1) * dy
      END DO
      DO k=1, Kmax
          T(k) = (k - 1) * dt
      END DO
     
      !initial conditions
      DO i=1, Imax
          DO j=1, Jmax
              U(i, j, 1) = initial(X(i), Y(j))
          END DO
      END DO
     
      !main time loop
      DO k = 1, Kmax
      !Boundary Conditions:
          !bottom
          DO i=1, Imax-1
              U(i, 1, k+1)    = bottom(X(i), T(k+1))
          END DO
          !top
          DO i=2, Imax
              U(i, Jmax, k+1)    = top(X(i), T(k+1))
          END DO
          !right
          DO j=1, Jmax-1
              U(Imax, j, k+1)    = right(Y(j), T(k+1))
          END DO
          !left
          DO j=2, Jmax
              U(1, j, k+1)    = left(Y(j), T(k+1))
          END DO
      !Middle Diffusion Scheme:
          DO i=2, Imax-1
              DO j=2, Jmax-1
              Uxx = U(i+1, j, k) - 2.0 * U(i, j, k) + U(i-1, j, k)
              Uyy = U(i, j+1, k) - 2.0 * U(i, j, k) + U(i, j-1, k)
              U(i, j, k+1) = U(i, j, k) + Rx * Uxx + Ry * Uyy
              END DO
          END DO
      END DO
     
      !Print to file
      OPEN(1, file = 'DiffusionSolver2D_Output.dat')
      WRITE(1, *) 't, x, y, u'
      DO k=1, Kmax
          DO i=1, Imax
              DO j=1, Jmax
                  WRITE(1, *) T(k), ', ', X(i), ', ', Y(j), ', ',
     .            U(i, j, k)
              END DO
          END DO
      END DO
      CLOSE(1)
     
      STOP
    END !PROGRAM DiffusionSolver2
   
    FUNCTION top(x, t)
          IMPLICIT NONE
          DOUBLE PRECISION top, x, t
          top = 0.0 !Write any function of x and t
          RETURN
      END
      FUNCTION bottom(x, t)
          IMPLICIT NONE
          DOUBLE PRECISION bottom, x, t
          bottom = 0.0 !Write any function of x and t
          RETURN
      END
      FUNCTION left(y, t)
          IMPLICIT NONE
          DOUBLE PRECISION left, y, t
          left = 0.0 !Write any function of y and t
          RETURN
      END
      FUNCTION right(y, t)
          IMPLICIT NONE
          DOUBLE PRECISION right, y, t
          right = 0.0 !Write any function of y and t
          RETURN
      END
      FUNCTION initial(x, y)
          IMPLICIT NONE
          DOUBLE PRECISION initial, x, y
          initial = 5 !Write any function of x and y
          RETURN
      END

The language is Fortran 95 and I am using GNU's gfortran compiler and Jedit to write the code

Tuesday, October 18, 2011

Mathematical Construct of Data Acquisition

RK-4 average C* method for determining axially averaged instantaneous regression and internal ballistics.
Iterative Least Squared Regression method for determining ballistic coefficients corresponding to burn rate pressure dependence, flux dependence, and constant of proportionality. The O/F corrected burn rate model is used.
 Based on the above calculations, I have composed a list of necessary parameters for data collection. This list forms the foundation of my experimental methods.
Useful equations  relating C* to specific impulse and other thermochemical gas properties. Interestingly, an optimal oxidizer flow rate can be calculated given an optimal O/F and instantaneous chamber pressure and port radius. This may prove useful in computer throttled commercial hybrids.

Sunday, October 16, 2011

Chemicals

5-Amino-1H-Tetrazole also called 5-Aminotetrazole or 5-AT:
5-AT is the principal reagent in the synthesis of Sodium Azotetrazolate (Na2ZT), a critical reagent in the synthesis of HBT, G2ZT, GAT, and HAT.
          **Interesting Note: 5-AT is used as the propellant in automotive airbags!**
               <http://www.finechemicalsinc.com/chemicals/aerospace/5-amino-1h-tetrazole/>
-chemreagents.com
     <http://www.chemreagents.com/Product/Product.asp?ProductID=819545>
     $26.00/100g
-Sigma-Aldrich
     <http://www.sigmaaldrich.com/catalog/ProductDetail.do?lang=en&N4=550728|ALDRICH&N5=SEARCH_CONCAT_PNO|BRAND_KEY&F=SPEC>
     $160.50/500g
-Abblis
     <http://www.abblis.com/product_4418-61-5.html>
     $110/500g
     *best price but out of stock. Also claims that bulk orders (>500g) receive a "huge discount"
-Fine Chemicals
      <http://www.finechemicalsinc.com/chemicals/aerospace/5-amino-1h-tetrazole/>
     Inquire about price by requesting a quote.

Paraffin wax:
-Sold by Sigma-Aldrich according to melting point (ranging from 53-80 deg C)
     $33.30/1Kg - $44.20/1Kg
     *If it turns out that energetic additives are outside of the budget, I could potentially change the focus of my project to determining the effect of the paraffin fuel's melting point on burn rate and performance.

High-test Peroxide:
85% Hydrogen Peroxide is optimal for silver catalyst beds, offering the maximum performance without melting the silver mesh. Given a fuel mass of roughly 250g, 85% peroxide solution, and a typical O/F ratio of 6, 1.765Kg of Peroxide will be needed for each trial.
-Peroxide Propulsion
     <http://www.peroxidepropulsion.com/hydrogen-peroxide.php>
     90% ==> $9.92/1Kg
     85% ==> $8.27/1Kg ==> $14.59/trial
     80% ==> $7.27/1Kg

Sodium Hydroxide:
Needed to synthesize Na2ZT

Potassium Permanganate:
Needed to synthesize Na2ZT

Magnesium Powder:
Needed to synthesize HBT

Hydrochloric Acid:
Needed to synthesize HBT

Hydrazine Soln in Tetrahydrofuran (THF)
Needed to synthesize HAT *excluded for first round of trials*
-Sigma-Aldrich
     1.0M ==> $116.50/800mL
***or***
Hydrazine Monohydrate
Needed to synthesize HAT *excluded for first round of trials*
-Sigma-Aldrich
     $103.00/1Kg

Thursday, October 13, 2011

Project Refinement #3

My research will focus on the synthesis and evaluation of various quantities of 5,5'-hydrazinebistetrazole (HBT) in paraffin-based hybrid rocket fuels. A similar compound gaunidinium azotetrazolate (GAT) has been shown to increase the burn rate performance of HTPB hybrid rocket fuels. Neither GAT nor HBT have been tested in liquefying paraffin fuels. HBT has been selected over GAT, hydrazinium 5-aminotetrazolate (HAT), and other tetrazoles due to its advantages in synthesis and performance. HBT has a higher density, nitrogen content, heat of formation, detonation pressure, and detonation velocity than GAT.  HBT is a comparable energetic material in performance to the high explosives RDX and HMX. However, HBT is far less sensitive to all forms of shock compared to these explosives. When ignited in powder or pellet form, HBT burns rapidly. HAT is even less sensitive than than HBT and has a higher performance including heat of formation and detonation velocity than HBT, RDX, HMX, and CL-20.

The synthesis of HBT is also simpler and less expensive than GAT. Cost is the main reason for HBT's selection over HAT for initial testing. For HBT's production, 5-amino-1H-tetrazole (5-AT), sodium hydroxide, potassium permanganate, hydrochloric acid, and magnesium powder are required. 5-AT is also required for the synthesis of HAT. To synthesize HAT, 5-AT must be reacted with hydrazine in an solution of tetrahydrofuran (THF) or with hydrazine hydrate. A 1M solution of hydrazine in THF is about $150.00 per liter and hydrazine hydrate is about $100.00 per kilogram. Because of a limited budget, I have tentatively eliminated the initial consideration of HAT.

5-AT is oxidized by potassium permanganate in sodium hydroxide solution to yield sodium azotetrazolate (Na2ZT). Na2ZT provides the azotetrazolate cation for producing both HBT and GAT. When Na2ZT is allowed to react for several hours with magnesium powder and is subsequently treated with hydrochloric acid, HBT is precipitated on cooling. This procedure is completely reasonable in the lab. I estimate than an average of 100g of HBT will be used for each trial. Assuming 30 trials, roughly 3Kg of HBT will need to be produced. Bulk synthesis techniques will be required to produce this volume and will be further studied. A complete list of lab equipment will need to be formulated.

The oxidizer used during firing will be held constant. Optimally, I would like to use >80% hydrogen peroxide over a catalyst bed. The exothermic decomposition of hydrogen peroxide will cause auto-ignition of the fuel, eliminating the need for costly ignition systems and fire sequence programming. Also, the use of hydrogen peroxide has been shown to increase the burn rate of hybrid rocket fuels. Hydrogen peroxide can be obtained at 85% concentrations for $8.27 per kilogram. At optimal O/F ratios of about 6 and 250g of propellant, the cost for a test comes to $12.40.

Since the ultimate goal is to improve the performance of hybrid rocket motors, the project will stay flexible. If the time exists for further testing, HAT will be synthesized, tested, and compared to HBT. Metallized fuels with HBT or HAT could also be characterized. Another direction could be the variation of the polymer chain length in the paraffin fuel to test its effect on propellant mechanical properties and performance with HBT or HAT.  This, however, may have to be left for future research.

My research will now focus on the physical aspects of hybrid rocket motor design and testing. I will first determine what parameters of the motor need to be varied and what characteristics need to be measured in order to characterize the fuel mixes with varying HBT loading. I will also focus on the design of small-scale hybrid rocket motors for testing. Later, instrumentation and equipment will be detailed and located for collecting data.

Friday, October 7, 2011

ACSI Update

I have selected Fortran as the language of choice for my gas dynamics code. Serious research has been done into the mathematical construct of gridless CFD and chemical codes. As this research continues, I will be learning Fortran with a focus on numerically solving partial differential equations. I will start by solving simple 2D diffusion problems using a finite difference scheme then develop an equivalent FPM method for diffusion, working my way up to a fully functional 3D FPM method for fluid flow. Now I am working my way through the basics of programming in Fortran. After programming "Hello World!" I made a simple program that accepts input from the command line. The program sums the two numbers entered and prints the answer.

      PROGRAM AddTo
      REAL NUM1, NUM2, SUM
      PRINT *, "Enter first number"
      READ(*,*) NUM1
      PRINT *, "Enter second number"
      READ(*,*) NUM2
      SUM = NUM1 + NUM2
      PRINT *, "The sum is ", SUM
      END PROGRAM AddTo

I am using GNU's gfortran compiler for Fortran 95 and jEdit to write my code

I have been using these sources for learning basic Fortran:
http://www.mesoscale.iastate.edu/agron505/fortran.htm
http://folk.uio.no/steikr/doc/f77/tutorial/

Tuesday, October 4, 2011

Project Refinement #2

The synthesis of high energy materials can be complex. Several methods also involve the use of expensive reagents that would be impractical on a commercial level useful for civilian aerospace companies. The preparation, firing, and data acquisition of any rocket motor is also somewhat intensive in terms of time, materials, and fabrication. These facts limit the attainable number of trials in the overall experiment. Since only a limited number of trials are possible, it is not reasonable to record data over a wide variety of energetic propellant additives. Rather, one additive will be selected for synthesis and tested in various concentrations with and against other commercially available additives like powders of light metals. Cost will be a major factor in choosing which additives to acquire and synthesize. For synthesis, I will focus on one substance, then, provided sufficient characterization of the chosen substance and remaining time, another will be attempted.

Solid propellants which liquefy at their combustion surface have demonstrated potential to increase the burn rate in hybrid rocket motors. Significant convective heating from the detached combusting boundary layer causes the fuel to form a liquid layer. High velocity gradients cause shear stress at the liquid surface, resulting in its destabilization into waves which eject mass into the combustion stream. Paraffin is one such liquefying fuel that has been studied with promising results. Various energetic additives have the potential to further increase the energy content, burn rate, and performance of paraffin based solid fuels. Paraffin wax is cheap, easy to handle, and easy to cast into propellant grains. MMHNF, GAT, TAGzT,  HBT, and ADMP are all possible additive candidates to be considered for synthesis and use in paraffin based fuel. Aluminum and magnesium powders can also be added in order increase the heat of combustion. A single liquid oxidizer will be used for all trials. This will either be nitrous oxide or highly concentrated >80% hydrogen peroxide. Nitrous oxide offers low cost and self pressurization where hydrogen peroxide offers better performance.

Another, much less explored, option is the use of a liquefying oxidizer as the solid propellant with other crystalline oxidizer additives. A liquid hydrocarbon fuel, hydrazine, or aluminum borohydride could be used as the injected fuel. Hydrocarbons like kerosene are cheap and easily used as fuels. Hydrazine offers the ability to exothermically pre-decompose and possibly increase performance. Aluminum borohydride and other "zip-fuels" containing borane will offer the highest possible performance. The oxidizer candidate would be the nitroparaffin hexanitroethane. This substance has found limited use in propellants and flares as a nitrogen rich oxidizer. It's melting point of 135 degrees Celsius allowing it to be cast in a similar manner to sugar based "R-Candy" solid propellants. HNF or another oxidizer like AP, AN, or KN could be mixed into the solid oxidizer. An energetic like MMHNF, GAT, TAGzT, or HBT could also be added in small amounts. In the case of hexanitroethane solid propellants, this substance would be synthesized and tested on its own with a liquid fuel. Such an experiment would constitute entirely new research even without an additive.

The next phase of the research will entail assessing the feasibility of making each propellant combination and choosing the simplest one that offers the maximum theoretical performance. The focus is on the practical application of greener experimental hybrid propellants for future civilian aerospace efforts. Even if a substance can be made in the lab on a small scale, it may not be reasonable to apply it on the larger scale mandated by civilian aerospace. A high-performing propellant combination that is expensive and difficult to produce is effectively useless for this end and will not be considered in my research. Rather, obtaining the maximum performance at costs attainable by aerospace start-ups will be the goal.