!************************************************************
!CÁLCULO DA ÁREA SUPERFICIAL DO NARIZ
!************************************************************

SUBROUTINE Narizgeo (Pi, Na, Lna, Dna, Swetna)

INTEGER Na

REAL*8 ex, Lna, Dna, Swetna, Pi, g
 

SELECT CASE (Na)
 
   !***********************************************
    CASE(1) !ÁREA SUPERFICIAL DE UM ELIPSÓIDE (mm²)
   !***********************************************

	!Cálculo da excentricidade 1

	ex = dsqrt(1d0 - (Dna/2d0)**2d0/Lna**2d0)

	!Cálculo da área superficial (in²)

	Swetna = Pi*((Dna/2d0)**2d0+((Dna/2d0)*Lna*dasin(ex)/ex))  !Fórmula aproximada
    
    !Swetna = Dna*Lna*2d0*Pi
    	
   !***********************************************************************
	CASE(2) !ÁREA SUPERFICIAL DE UMA OGIVA - tangente ao tubo-foguete (mm²)
   !***********************************************************************

	Swetna = Pi*((Lna**2d0+(Dna/2d0)**2d0)/(Dna/2d0))*(((Dna/2d0)**2d0-Lna**2d0)*dasin(2d0*(Dna/2d0)*Lna/(Lna**2d0+(Dna/2d0)**2d0))/(2d0*(Dna/2d0))+Lna)
	
	
   !***********************************************************************
	CASE(3) !ÁREA SUPERFICIAL DE UM CONE (mm²)
   !***********************************************************************
    g = dsqrt(Lna**2d0+(Dna/2d0)**2d0)
    
	Swetna = Pi*(Dna/2d0)*g 
	
    !***************************************************************************
    CASE(4) !ÁREA SUPERFICIAL DE UM NARIZ COM SÉRIE DE POTÊNCIA PARABÓLICA (mm²)
   !****************************************************************************
    
    Swetna = (Pi*(Dna/2d0)/(6d0*Lna**2d0))*(((Dna/2d0)**2d0+4d0*Lna**2d0)**(1.5d0)-((Dna/2d0)**2d0)**(1.5d0))
   
    END SELECT
    
END SUBROUTINE Narizgeo
