VMEC
8.52
3D Equilibrium solver with nested flux surfaces.
Toggle main menu visibility
Loading...
Searching...
No Matches
aspectratio.f90
Go to the documentation of this file.
1
!> \file
2
!> \brief compute aspect-ratio (independent of elongation): \f$A = <R>/\sqrt{<a b>}\f$
3
4
!> \brief compute aspect-ratio (independent of elongation): \f$A = <R>/\sqrt{<a b>}\f$
5
!> where \f$\pi <a>^2 = \textrm{Area (toroidally averaged)}\f$
6
!> and \f$2 \pi <R> \textrm{Area} = \textrm{Volume}\f$
7
FUNCTION
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
36
cross_area_p
=
cross_area_p
+ t1
37
END DO
38
39
volume_p
= 2*
pi
*
pi
*abs(
volume_p
)
40
cross_area_p
= 2*
pi
*abs(
cross_area_p
)
41
42
rmajor_p
=
volume_p
/(2*
pi
*
cross_area_p
)
43
aminor_p
= sqrt(
cross_area_p
/
pi
)
44
45
aspectratio
=
rmajor_p
/
aminor_p
46
47
END FUNCTION
aspectratio
aspectratio
real(rprec) function aspectratio()
compute aspect-ratio (independent of elongation): where and
Definition
aspectratio.f90:8
realspace
Definition
realspace.f90:2
realspace::wint
real(rprec), dimension(:), allocatable wint
two-dimensional array for normalizing angle integrations
Definition
realspace.f90:34
realspace::r1
real(rprec), dimension(:,:), allocatable r1
Definition
realspace.f90:8
realspace::zu
real(rprec), dimension(:,:), allocatable zu
Definition
realspace.f90:12
stel_constants
Definition
stel_constants.f90:2
stel_constants::pi
real(dp), parameter pi
Definition
stel_constants.f90:12
vmec_io
Definition
vmec_io.f90:2
vmec_io::aminor_p
real(rprec) aminor_p
Definition
vmec_io.f90:10
vmec_io::cross_area_p
real(rprec) cross_area_p
Definition
vmec_io.f90:18
vmec_io::volume_p
real(rprec) volume_p
Definition
vmec_io.f90:17
vmec_io::rmajor_p
real(rprec) rmajor_p
Definition
vmec_io.f90:11
vmec_main
Definition
vmec_main.f90:2
src
aspectratio.f90
Generated on
for VMEC by
1.17.0