VMEC 8.52
3D Equilibrium solver with nested flux surfaces.
Loading...
Searching...
No Matches
aspectratio.f90
Go to the documentation of this file.
1
3
7FUNCTION aspectratio()
8 use stel_constants, only: pi
9 USE vmec_main
10 USE realspace
11 USE vmec_io
12 IMPLICIT NONE
13
14 INTEGER :: lk, l
15 REAL(rprec) :: rb, zub, t1, aspectratio ! pi,
16
17 ! routine for computing aspect-ratio (independent of elongation):
18 ! A = <R>/<ab>**.5
19 !
20 ! WHERE pi <a>**2 = Area (toroidally averaged)
21 ! 2*pi * <R> * Area = Volume
22 ! Use integration by parts to compute as surface integral (Stoke''s theorem)
23
24 !pi = 4*ATAN(one) ! now from stel_constants
25
26 ! Compute Volume and Mean (toroidally averaged) Cross Section Area
27
28 volume_p = 0
29 cross_area_p = 0
30 DO lk = 1, nznt
31 l = ns*lk
32 rb = r1(l,0) + r1(l,1)
33 zub = zu(l,0) + zu(l,1)
34 t1 = rb*zub*wint(l)
35 volume_p = volume_p + rb*t1
37 END DO
38
39 volume_p = 2*pi*pi*abs(volume_p)
41
44
46
47END FUNCTION aspectratio
real(rprec) function aspectratio()
compute aspect-ratio (independent of elongation): where and
real(rprec), dimension(:), allocatable wint
two-dimensional array for normalizing angle integrations
Definition realspace.f90:34
real(rprec), dimension(:,:), allocatable r1
Definition realspace.f90:8
real(rprec), dimension(:,:), allocatable zu
Definition realspace.f90:12
real(dp), parameter pi
real(rprec) aminor_p
Definition vmec_io.f90:10
real(rprec) cross_area_p
Definition vmec_io.f90:18
real(rprec) volume_p
Definition vmec_io.f90:17
real(rprec) rmajor_p
Definition vmec_io.f90:11