-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavd.f90
More file actions
1710 lines (1464 loc) · 77 KB
/
avd.f90
File metadata and controls
1710 lines (1464 loc) · 77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!+
! PROGRAM AbbottVonDoenhoff ! pdas/naca456/avd.f90
! ---------------------------------------------------------------------------
! PURPOSE - Make tables of the data in Abbott and von Doenhoff book
! entitled "Theory of Airfoil Sections".
! The output will be HTML 5 files for viewing in a browser.
! AUTHOR - Ralph L. Carmichael, Public Domain Aeronautical Software
!
! REVISION HISTORY
! DATE VERS PERSON STATEMENT OF CHANGES
! 20Nov01 0.1 RLC Original coding (used program in \atmos as guide )
! 21Nov01 0.2 RLC Added the actual airfoil calculations
! 23Nov01 0.3 RLC Cambered sections both interp and non-interp
! 27Nov01 0.4 RLC Rearranged tables at head of each section
! 30Nov01 0.5 RLC Changed output to four figures; added leRadius
! 02Dec01 0.6 RLC Renamed some procedures. Added remainder of profiles
! 07Dec01 0.7 RLC Finally got leRadius, leSlope right
! 20Jan02 0.8 RLC Put #top at top of page
! 26Jan02 0.9 RLC Separated sections into 3 groups
! 07Apr02 1.0 RLC Added the missing profiles and sections. Noted charset
! 08Feb03 1.1 RLC Made the resulting files XHTML-1.1 STRICT
! 16Feb03 1.2 RLC Fixed items that caused non-compliance with XHTML 1.1
! 15Jan09 1.3 RLC Additional fixes for XHTML 1.1 and file names are *.html
! 16Jan09 1.4 RLC Added WriteBanner,WriteCrumb,WriteFooter
! 17Jan09 1.5 RLC Added MainPage; removed Welcome and debug file
! 07Nov10 1.6 RLC Revised to create HTML 5
! 18Jul17 1.7 RLC Correcting some HTML 5 errors
! 24Apr21 1.8 RLC Minor revisions, moved to httpsdocs from httpdocs
! 31May22 1.9 RLC Removed td.links from WriteHead (obsolete)
!
! NOTES- If you should recompile this source code, you should use the
! appropriate compiler flag making the default real kind as 64-bit.
! With gfortran this is -fdefault-real-8
!-------------------------------------------------------------------------------
INCLUDE 'splprocs.f90'
INCLUDE 'epspsi.f90'
INCLUDE 'nacax.f90'
! NOTE - If you want to modify and recompile this program, you will need the
! three files above as well as avd.f90. These are also used by naca456.f90.
!+
MODULE AbbottVonDoenhoffSubs
! ------------------------------------------------------------------------------
! PURPOSE - Subroutines called by Program AbbottVonDoenhoff.
! Make tables of the data in Abbott and von Doenhoff.
! This module is not used by the naca456 program.
IMPLICIT NONE
PUBLIC:: WriteFourDigitProfile
PUBLIC:: WriteModifiedFourDigitProfile
PUBLIC:: WriteSixSeriesProfile
PUBLIC:: WriteTwoDigitMeanLine
PUBLIC:: WriteThreeDigitMeanLine
PUBLIC:: WriteThreeDigitReflexMeanLine
PUBLIC:: WriteSixSeriesMeanLine
PUBLIC:: WriteSixSeriesModifiedMeanLine
PUBLIC:: WriteFourDigitSection
PUBLIC:: WriteModifiedFourDigitSection
PUBLIC:: WriteFiveDigitSection
PUBLIC:: WriteFiveDigitReflexSection
PUBLIC:: WriteSixSeriesSection
PRIVATE:: WriteOneProfile
PRIVATE:: WriteOneMeanLine
PRIVATE:: WriteOneSection
PRIVATE:: WriteColumns, WriteColumns2
PUBLIC:: WriteTextTable, WriteTextTableRows
PUBLIC:: WriteBanner,WriteCrumb,WriteFooter,WriteHead
!-------------------------------------------------------------------------------
CONTAINS
!+
SUBROUTINE WriteFourDigitProfile(efu,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a four-digit profile
USE NACAauxilary,ONLY: Thickness4,LeadingEdgeRadius4
! Uses module procedure WriteOneProfile
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! profile name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: rle ! radius of leading edge, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt,ytp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
CALL Thickness4(toc, x,yt,ytp) ! compute yt and ytp at each x-value
rle=LeadingEdgeRadius4(toc)
CALL WriteOneProfile(efu,name,id, x,yt,ytp, rle)
RETURN
END Subroutine WriteFourDigitProfile ! ---------------------------------------
!+
SUBROUTINE WriteModifiedFourDigitProfile(efu,leIndex,xmaxt,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a modified four-digit profile
USE NACAauxilary,ONLY: Thickness4M,LeadingEdgeRadius4M
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: leIndex ! leading edge index
! coded to allow leIndex to be a REAL
REAL,INTENT(IN):: xmaxt ! x-coor of maximum thickness
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! profile name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: rle
REAL,DIMENSION(SIZE(x)):: yt,ytp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
! compute yt and ytp at each x-value:
CALL Thickness4M(toc, leIndex, xmaxt, x,yt,ytp)
rle=LeadingEdgeRadius4M(toc,leIndex)
CALL WriteOneProfile(efu,name,id, x,yt,ytp, rle)
RETURN
END Subroutine WriteModifiedFourDigitProfile ! -------------------------------
!+
SUBROUTINE WriteSixSeriesProfile(efu,family,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a six-series profile.
USE NACAauxilary,ONLY: Thickness6,LeadingEdgeRadius6
INTEGER,INTENT(IN):: efu ! external file unit
INTEGER,INTENT(IN):: family ! =1 63; =2 64; =3 65; =4 66; =5 67
! =6 63A; =7 64A; =8 65A
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! profile name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: rle ! leading edge radius, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt,ytp ! tables of y and dy/dx
!-------------------------------------------------------------------------------
! compute yt and ytp at each x-value:
CALL Thickness6(family,toc, x,yt,ytp)
rle=LeadingEdgeRadius6(family,toc)
CALL WriteOneProfile(efu, name,id, x,yt,ytp, rle)
RETURN
END Subroutine WriteSixSeriesProfile ! ---------------------------------------
!+
SUBROUTINE WriteTwoDigitMeanLine(efu,cmax,xmaxc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a four-digit meanline.
USE NACAauxilary,ONLY: MeanLine2
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cmax ! max. camber (fraction of chord)
REAL,INTENT(IN):: xmaxc ! x-location of max. camber (fraction of chord)
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
! compute ymean and ymeanp at each x-value:
CALL MeanLine2(cmax,xmaxc, x,ymean,ymeanp)
CALL WriteOneMeanLine(efu, name,id, x,ymean,ymeanp)
RETURN
END Subroutine WriteTwoDigitMeanLine ! --------------------------------------
!+
SUBROUTINE WriteThreeDigitMeanLine(efu,cl,xmaxc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a three-digit meanline.
! EXAMPLE - A 210 mean line has design CL=0.3 and max camber at 5 percent
! (first digit is 2/3 CL in tenths;
! second digit is twice x of max camber in percent chord;
! third digit, zero, indicates non-reflexed )
! REF - Eq. 6.6, p.115 of Abbott and von Doenhoff
USE NACAauxilary,ONLY: MeanLine3
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cl ! design lift coefficient
REAL,INTENT(IN):: xmaxc ! x-location of max. camber (fraction of chord)
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
! compute ymean and ymeanp at each x-value:
CALL MeanLine3(cl,xmaxc, x,ymean,ymeanp)
CALL WriteOneMeanLine(efu, name,id, x,ymean,ymeanp)
RETURN
END Subroutine WriteThreeDigitMeanLine ! -------------------------------------
!+
SUBROUTINE WriteThreeDigitReflexMeanLine(efu,cl,xmaxc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a 3-digit reflex meanline
! REF - p.8 of NASA Technical Memorandum 4741 and NACA Report 537.
USE NACAauxilary,ONLY: MeanLine3Reflex
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cl ! design lift coefficient (same as non-reflex)
REAL,INTENT(IN):: xmaxc ! x-location of max. camber (fraction of chord)
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
! compute ymean and ymeanp at each x-value:
CALL MeanLine3Reflex(cl,xmaxc, x,ymean,ymeanp)
CALL WriteOneMeanLine(efu, name,id, x,ymean,ymeanp)
RETURN
END Subroutine WriteThreeDigitReflexMeanLine ! -------------------------------
!+
SUBROUTINE WriteSixSeriesMeanLine(efu,a,cl,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a six-series meanline
USE NACAauxilary,ONLY: MeanLine6
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: a ! x-coor of aft-position of pressure rooftop
REAL,INTENT(IN):: cl ! design lift coefficient
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
!-------------------------------------------------------------------------------
! compute ymean and ymeanp at each x-value:
CALL MeanLine6(a,cl, x,ymean,ymeanp)
CALL WriteOneMeanLine(efu, name,id, x,ymean,ymeanp)
RETURN
END Subroutine WriteSixSeriesMeanLine ! --------------------------------------
!+
SUBROUTINE WriteSixSeriesModifiedMeanLine(efu,cl,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a six-series modified meanline
! NOTE - a is not input; a is always 0.8
USE NACAauxilary,ONLY: MeanLine6M
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cl ! design lift coefficient
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp
!-------------------------------------------------------------------------------
! compute ymean and ymeanp at each x-value:
CALL MeanLine6M(cl, x,ymean,ymeanp)
CALL WriteOneMeanLine(efu, name,id, x,ymean,ymeanp)
RETURN
END Subroutine WriteSixSeriesModifiedMeanLine ! ------------------------------
!+
SUBROUTINE WriteFourDigitSection(efu,cmax,xmaxc,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a four-digit airfoil section
! Three quantities (cmax,xmaxc and toc define the airfoil)
USE NACAauxilary,ONLY: Thickness4,LeadingEdgeRadius4,MeanLine2
USE NACAauxilary,ONLY: CombineThicknessAndCamber,InterpolateCombinedAirfoil
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cmax ! max. camber (fraction of chord)
REAL,INTENT(IN):: xmaxc ! x-location of max. camber (fraction of chord)
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: leSlope
REAL:: rle ! leading edge radius, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt ! table of half-thickness
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
REAL,DIMENSION(SIZE(x)):: xupper,yupper, xlower,ylower
REAL,DIMENSION(SIZE(x)):: yup,ylo
!-------------------------------------------------------------------------------
CALL Thickness4(toc, x,yt)
rle=LeadingEdgeRadius4(toc)
leSlope=2.0*cmax/xmaxc
CALL MeanLine2(cmax,xmaxc, x,ymean,ymeanp)
CALL CombineThicknessAndCamber(x,yt,ymean,ymeanp, &
xupper,yupper, xlower,ylower)
CALL InterpolateCombinedAirfoil(x,yt,ymean,ymeanp, yup,ylo)
CALL WriteOneSection(efu,name,id, x,yup, x,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
RETURN
END Subroutine WriteFourDigitSection ! ---------------------------------------
!+
SUBROUTINE WriteModifiedFourDigitSection(efu,cmax,xmaxc, &
leIndex,xmaxt,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a modified four-digit airfoil.
! NOTE - leIndex is coded as REAL, although it is usually integer.
USE NACAauxilary,ONLY: Thickness4M,LeadingEdgeRadius4M,MeanLine2
USE NACAauxilary,ONLY: CombineThicknessAndCamber,InterpolateCombinedAirfoil
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cmax ! max. camber (fraction of chord)
REAL,INTENT(IN):: xmaxc ! x-location of max. camber (fraction of chord)
REAL,INTENT(IN):: leIndex ! leading edge index
REAL,INTENT(IN):: xmaxt ! x-location of max. thickness (fraction of chord)
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: leSlope
REAL:: rle ! leading edge radius, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
REAL,DIMENSION(SIZE(x)):: xupper,yupper, xlower,ylower
REAL,DIMENSION(SIZE(x)):: yup,ylo
!-------------------------------------------------------------------------------
CALL Thickness4M(leIndex,xmaxt,toc, x,yt)
rle=LeadingEdgeRadius4M(leIndex,toc)
leSlope=2.0*cmax/xmaxc
CALL MeanLine2(cmax,xmaxc, x,ymean,ymeanp)
CALL CombineThicknessAndCamber(x,yt,ymean,ymeanp, &
xupper,yupper, xlower,ylower)
CALL InterpolateCombinedAirfoil(x,yt,ymean,ymeanp, yup,ylo)
CALL WriteOneSection(efu,name,id, x,yup, x,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
RETURN
END Subroutine WriteModifiedFourDigitSection ! -------------------------------
!+
SUBROUTINE WriteFiveDigitSection(efu,cl,xmaxc,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a five-digit airfoil.
USE NACAauxilary,ONLY: Thickness4,LeadingEdgeRadius4,MeanLine3,GetRk1
USE NACAauxilary,ONLY: CombineThicknessAndCamber,InterpolateCombinedAirfoil
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cl ! design lift coefficient
REAL,INTENT(IN):: xmaxc ! x-coor of max camber (fraction of chord)
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: k1 ! from GetRk1
REAL:: leSlope
REAL:: r ! from GetRk1
REAL:: rle ! leading edge radius, fraction of chord (from LeadingEdgeRadius)
REAL,DIMENSION(SIZE(x)):: yt ! table of HALF-thickness
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx for mean line
REAL,DIMENSION(SIZE(x)):: xupper,yupper ! tables of (x,y) for upper surface
REAL,DIMENSION(SIZE(x)):: xlower,ylower ! tables of (x,y) for lower surface
REAL,DIMENSION(SIZE(x)):: yup,ylo ! interpolated values, upper and lower
!-------------------------------------------------------------------------------
CALL Thickness4(toc, x,yt)
rle=LeadingEdgeRadius4(toc)
CALL GetRk1(xmaxc,r,k1)
leSlope=r*r*(3.0-r)*k1*cl/1.8
CALL MeanLine3(cl,xmaxc, x,ymean,ymeanp)
CALL CombineThicknessAndCamber(x,yt,ymean,ymeanp, &
xupper,yupper, xlower,ylower)
CALL InterpolateCombinedAirfoil(x,yt,ymean,ymeanp, yup,ylo)
CALL WriteOneSection(efu, name,id, x,yup, x,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
RETURN
END Subroutine WriteFiveDigitSection ! ---------------------------------------
!+
SUBROUTINE WriteFiveDigitReflexSection(efu,cl,xmaxc,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a 5-digit reflex airfoil.
USE NACAauxilary,ONLY: Thickness4,LeadingEdgeRadius4,MeanLine3Reflex,GetRk1k2
USE NACAauxilary,ONLY: CombineThicknessAndCamber,InterpolateCombinedAirfoil
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN):: cl ! design lift coefficient
REAL,INTENT(IN):: xmaxc ! x-coor of max camber (fraction of chord)
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: k1,k21
REAL:: leSlope
REAL:: mr3,r,r3
REAL:: rle ! leading edge radius, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
REAL,DIMENSION(SIZE(x)):: xupper,yupper, xlower,ylower
REAL,DIMENSION(SIZE(x)):: yup,ylo
!-------------------------------------------------------------------------------
CALL Thickness4(toc, x,yt)
rle=LeadingEdgeRadius4(toc)
CALL GetRk1k2(xmaxc,r,k1,k21)
r3=r**3
mr3=(1.0-r)**3
leSlope=(3.0*r*r-k21*mr3-r3)*k1*cl/1.8
CALL MeanLine3reflex(cl,xmaxc, x,ymean,ymeanp)
CALL CombineThicknessAndCamber(x,yt,ymean,ymeanp, &
xupper,yupper, xlower,ylower)
CALL InterpolateCombinedAirfoil(x,yt,ymean,ymeanp, yup,ylo)
CALL WriteOneSection(efu, name,id, x,yup, x,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
RETURN
END Subroutine WriteFiveDigitReflexSection ! ---------------------------------
!+
SUBROUTINE WriteSixSeriesSection(efu,family,a,cl,toc,name,id,x)
! ------------------------------------------------------------------------------
! PURPOSE - Calculate and print the coordinates of a six-series airfoil.
USE NACAauxilary,ONLY: Thickness6,MeanLine6,MeanLine6M,LeadingEdgeRadius6
USE NACAauxilary,ONLY: CombineThicknessAndCamber,InterpolateCombinedAirfoil
INTEGER,INTENT(IN):: efu ! external file unit
INTEGER,INTENT(IN):: family ! =1 63; =2 64; =3 65; =4 66; =5 67
! =6 63A; =7 64A; =8 65A
REAL,INTENT(IN):: a ! x-coor of aft-position of pressure rooftop
REAL,INTENT(IN):: cl ! design lift coefficient
REAL,INTENT(IN):: toc ! thickness / chord (fraction, not percent)
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coordinates for calculation
REAL:: leSlope
REAL:: rle ! leading edge radius, fraction of chord
REAL,DIMENSION(SIZE(x)):: yt
REAL,DIMENSION(SIZE(x)):: ymean,ymeanp ! yables of y and dy/dx
REAL,DIMENSION(SIZE(x)):: xupper,yupper, xlower,ylower
REAL,DIMENSION(SIZE(x)):: yup,ylo
!-------------------------------------------------------------------------------
CALL Thickness6(family,toc, x,yt)
IF (family < 6) THEN
CALL MeanLine6(a,cl, x,ymean,ymeanp)
ELSE
CALL MeanLine6M(cl,x,ymean,ymeanp)
END IF
rle=LeadingEdgeRadius6(family,toc)
leSlope=ymeanp(2) ! we know the 2nd element from LoadX is 0.05 (MAGIC)
CALL CombineThicknessAndCamber(x,yt,ymean,ymeanp, &
xupper,yupper, xlower,ylower)
CALL InterpolateCombinedAirfoil(x,yt,ymean,ymeanp, yup,ylo)
CALL WriteOneSection(efu, name,id, x,yup, x,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
RETURN
END Subroutine WriteSixSeriesSection ! ---------------------------------------
!+
SUBROUTINE WriteOneMeanLine(efu,name,id,x,y,yp)
! ------------------------------------------------------------------------------
! PURPOSE - Write the description of one mean line to the HTML file.
INTEGER,INTENT(IN):: efu ! external file unit
CHARACTER(LEN=*),INTENT(IN):: name ! mean line name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x,y,yp ! tables of x,y,dy/dz
!-------------------------------------------------------------------------------
WRITE(efu,*) '<table>'
WRITE(efu,*) &
'<tr><th colspan="3"><a id="'//id//'">NACA Mean Line </a>'//name//'</th></tr>'
WRITE(efu,*) '<tr><td class="center" colspan="3">'
WRITE(efu,*) '(Stations and ordinates given<br />'
WRITE(efu,*) 'in per cent of airfoil chord)</td></tr>'
WRITE(efu,*) '<tr><td class="center">x</td><td class="center">y</td>'// &
'<td class="center">dy/dx</td></tr>'
CALL WriteColumns2(efu, 100.0*x,100.0*y,yp)
WRITE(efu,*) "</table>"
WRITE(efu,*) '<p>Go to the <a href="#TopMeanLines">top</a> of the page</p>'
RETURN
END Subroutine WriteOneMeanLine ! --------------------------------------------
!+
SUBROUTINE WriteOneProfile(efu,name,id,x,y,yp, rle)
! ------------------------------------------------------------------------------
! PURPOSE - Write the description of one thickness to the HTML file.
INTEGER,INTENT(IN):: efu ! external file unit
CHARACTER(LEN=*),INTENT(IN):: name ! profile name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: x,y,yp ! tables of x,y,dy/dz
REAL,INTENT(IN):: rle ! leading edge radius, fraction of chord
CHARACTER(LEN=*),PARAMETER:: FMT1 = &
"('<tr><td colspan=""3"">L.E. radius = ', F5.3, ' percent chord</td></tr>')"
!-------------------------------------------------------------------------------
WRITE(efu,*) '<table class="avd">'
WRITE(efu,*) &
'<tr><th colspan="3"><a id="'//id//'">NACA Profile </a>'//name//'</th></tr>'
WRITE(efu,*) '<tr><td class="center" colspan="3">'
WRITE(efu,*) '(Stations and ordinates given<br />'
WRITE(efu,*) 'in per cent of airfoil chord)</td></tr>'
WRITE(efu,*) '<tr><td class="center">x</td><td class="center">y</td>'// &
'<td class="center">dy/dx</td></tr>'
CALL WriteColumns2(efu, 100.0*x,100.0*y,yp)
WRITE(efu,FMT1) 100.0*rle
WRITE(efu,*) "</table>"
WRITE(efu,*) '<p>Go to the <a href="#TopProfiles">top</a> of the page</p>'
RETURN
END Subroutine WriteOneProfile ! ---------------------------------------------
!+
SUBROUTINE WriteOneSection(efu,name,id,xup,yup,xlo,ylo, &
xupper,yupper, xlower,ylower, rle,leSlope)
! ------------------------------------------------------------------------------
! PURPOSE - Write the description of one airfoil section to the HTML file.
! NOTE - Writes a table with one row and two columns. Each of the two cells
! of this table contains a table with four columns and enough rows to
! display xup, etc. along with column headers.
INTEGER,INTENT(IN):: efu ! external file unit
CHARACTER(LEN=*),INTENT(IN):: name ! section name
CHARACTER(LEN=*),INTENT(IN):: id ! HTML identification code
REAL,INTENT(IN),DIMENSION(:):: xup,yup,xlo,ylo
REAL,INTENT(IN),DIMENSION(:):: xupper,yupper,xlower,ylower
REAL,INTENT(IN):: rle ! leading edge radius, fraction of chord
REAL,INTENT(IN):: leSlope ! slope of mean line at leading edge
! for 6-series mean lines, this is the slope
! at 0.5 per cent chord
CHARACTER(LEN=*),PARAMETER:: FMT1 = &
"('<tr><td class=""center"" colspan=""4"">L.E. radius = ', F5.3, ' percent c</td></tr>')"
CHARACTER(LEN=*),PARAMETER:: FMT2 = &
"('<tr><td class=""center"" colspan=""4"">slope of mean line at LE = ', F7.4,'</td></tr>')"
!-------------------------------------------------------------------------------
WRITE(efu,*) '<table>'
WRITE(efu,*) '<tr>'
WRITE(efu,*) '<td style="border-style: none;">'
WRITE(efu,*) '<table>'
WRITE(efu,*) &
'<tr><th colspan="4"><a id="'//id//'">NACA Section </a>'//name// '</th></tr>'
WRITE(efu,*) '<tr><td class="center" colspan="4">'
WRITE(efu,*) '(Stations and ordinates given<br />'
WRITE(efu,*) 'in per cent of airfoil chord)</td></tr>'
WRITE(efu,*) '<tr><td colspan="2" class="center">Upper Surface</td>'
WRITE(efu,*) '<td colspan="2" class="center">Lower Surface</td></tr>'
WRITE(efu,*) &
'<tr><td class="center">Station</td><td class="center">Ordinate</td>'
WRITE(efu,*) &
'<td class="center">Station</td><td class="center">Ordinate</td></tr>'
CALL WriteColumns2(efu, 100.0*xup,100.0*yup,100.0*xlo,100.0*ylo)
WRITE(efu,FMT1) 100.0*rle
WRITE(efu,FMT2) leSlope
WRITE(efu,*) "</table>"
WRITE(efu,*) "</td>"
WRITE(efu,*) '<td style="border-style: none;">'
WRITE(efu,*) '<table>'
WRITE(efu,*) '<tr><th colspan="4">NACA '//name//'</th></tr>'
WRITE(efu,*) '<tr><td class="center" colspan="4">'
WRITE(efu,*) '(Stations and ordinates given<br />'
WRITE(efu,*) 'in per cent of airfoil chord)</td></tr>'
WRITE(efu,*) '<tr><td class="center" colspan="2">Upper Surface</td>'
WRITE(efu,*) '<td class="center" colspan="2">Lower Surface</td></tr>'
WRITE(efu,*) &
'<tr><td class="center">Station</td><td class="center">Ordinate</td>'
WRITE(efu,*) &
'<td class="center">Station</td><td class="center">Ordinate</td></tr>'
CALL WriteColumns2(efu, 100.0*xupper,100.0*yupper,100.0*xlower,100.0*ylower)
WRITE(efu,FMT1) 100.0*rle
WRITE(efu,FMT2) leSlope
WRITE(efu,*) "</table>"
WRITE(efu,*) "</td>"
WRITE(efu,*) '</tr>'
WRITE(efu,*) '</table>'
WRITE(efu,*) '<p>Go to the <a href="#TopSections">top</a> of the page</p>'
RETURN
END Subroutine WriteOneSection ! ---------------------------------------------
!+
SUBROUTINE WriteColumns(efu,a,b,c,d,e,f)
! ------------------------------------------------------------------------------
! PURPOSE - Write the data in the arrays to the HTML file.
! Print 4 figures after decimal point
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN),OPTIONAL,DIMENSION(:):: a,b,c,d,e,f
CHARACTER(LEN=*),PARAMETER:: FMT='("<td>",F8.4,"</td>")'
INTEGER:: k
! REAL:: xx
!-------------------------------------------------------------------------------
IF (.NOT.Present(a)) RETURN
DO k=1,SIZE(a)
WRITE(efu,*) '<tr>'
WRITE(efu,FMT) a(k)
IF (Present(b)) WRITE(efu,FMT) b(k)
IF (Present(c)) WRITE(efu,FMT) c(k)
IF (Present(d)) WRITE(efu,FMT) d(k)
IF (Present(e)) WRITE(efu,FMT) e(k)
IF (Present(f)) WRITE(efu,FMT) f(k)
WRITE(efu,*) "</tr>"
END DO
RETURN
END Subroutine WriteColumns ! ------------------------------------------------
!+
SUBROUTINE WriteColumns2(efu,a,b,c,d,e,f)
! ------------------------------------------------------------------------------
! PURPOSE - Write the data in the arrays to the HTML file.
! Print 4 figures after decimal point
INTEGER,INTENT(IN):: efu ! external file unit
REAL,INTENT(IN),OPTIONAL,DIMENSION(:):: a,b,c,d,e,f
CHARACTER(LEN=8):: as,bs,cs,ds,es,fs
CHARACTER(LEN=132):: buffer
! CHARACTER(LEN=*),PARAMETER:: FMT='("<td>",F8.4,"</td>")'
CHARACTER(LEN=*),PARAMETER:: FMT='(F8.4)'
INTEGER:: k
! REAL:: xx
!-------------------------------------------------------------------------------
IF (.NOT.Present(a)) RETURN
DO k=1,SIZE(a)
WRITE(as,FMT) a(k)
IF (Present(b)) WRITE(bs,FMT) b(k)
IF (Present(c)) WRITE(cs,FMT) c(k)
IF (Present(d)) WRITE(ds,FMT) d(k)
IF (Present(e)) WRITE(es,FMT) e(k)
IF (Present(f)) WRITE(fs,FMT) f(k)
buffer='<tr><td>'//Trim(AdjustL(as))//'</td>'
IF (Present(b)) buffer=Trim(buffer)//'<td>'//Trim(AdjustL(bs))//'</td>'
IF (Present(c)) buffer=Trim(buffer)//'<td>'//Trim(AdjustL(cs))//'</td>'
IF (Present(d)) buffer=Trim(buffer)//'<td>'//Trim(AdjustL(ds))//'</td>'
IF (Present(e)) buffer=Trim(buffer)//'<td>'//Trim(AdjustL(es))//'</td>'
IF (Present(f)) buffer=Trim(buffer)//'<td>'//Trim(AdjustL(fs))//'</td>'
buffer=Trim(buffer)//'</tr>'
WRITE(efu,'(A)') Trim(buffer)
END DO
RETURN
END Subroutine WriteColumns2 ! ------------------------------------------------
!+
SUBROUTINE WriteTextTable(efu,entries,ncol)
! ------------------------------------------------------------------------------
! PURPOSE - Write a table with ncol columns in HTML format.
! Each cell has an <a> link and the name in the link is the
! value of the entry prefaced with a #. This is the HTML convention.
INTEGER,INTENT(IN):: efu ! external file unit
CHARACTER(LEN=*),INTENT(IN),DIMENSION(:):: entries ! array of strings
INTEGER,INTENT(IN):: ncol ! number of columns in the table
CHARACTER(LEN=*),PARAMETER:: FMT = '("<td class=""links""><a href=",A,">",A,"</a></td>")'
INTEGER:: k,k1,k2
INTEGER:: n
CHARACTER(LEN=132):: s
!-------------------------------------------------------------------------------
WRITE(efu,*) '<table>'//' <!-- links to positions on this page-->'
n=SIZE(entries)
k2=0
DO
WRITE(efu,*) '<tr>'
k1=k2+1
k2=MIN(k2+ncol,n)
DO k=k1,k2
s='"#' // Trim(AdjustL(entries(k))) // '"'
WRITE(efu,FMT) Trim(s),Trim(entries(k))
END DO
WRITE(efu,*) '</tr>'
IF (k2==n) EXIT
END DO
WRITE(efu,*) '</table>'
RETURN
END Subroutine WriteTextTable ! ----------------------------------------------
!+
SUBROUTINE WriteTextTableRows(efu,header,entries)
! ------------------------------------------------------------------------------
! PURPOSE - Write two rows of a table in HTML format.
! The number of columns in the table is the SIZE of entries.
! The first line is a header that spans all the columns.
! If the header has trimmed length of zero, don't write it.
! Each cell has an <a> link and the name in the link is the
! value of the entry prefaced with a #. This is the HTML convention.
INTEGER,INTENT(IN):: efu ! external file unit
CHARACTER(LEN=*),INTENT(IN):: header
CHARACTER(LEN=*),INTENT(IN),DIMENSION(:):: entries
CHARACTER(LEN=*),PARAMETER:: FMT1 = &
'("<tr><td class=""links"" colspan=",I1,">",A,"</td></tr>")'
CHARACTER(LEN=*),PARAMETER:: FMT2 = &
'("<td class=""links""><a href=",A,"</a></td>")'
INTEGER:: k
CHARACTER(LEN=132):: s
!-------------------------------------------------------------------------------
! WRITE(efu,*) '<table cellpadding=2 '// &
! 'summary="links to positions on this page">'
!!! WRITE(HTML,*) '<tr><td colspan=8>Four digit profiles</td></tr>'
k=MAX(2, SIZE(entries))
IF (LEN_TRIM(header) > 0) WRITE(efu,FMT1) k, header
WRITE(efu,*) '<tr>'
DO k=1,SIZE(entries)
s=AdjustL(entries(k))
s='"#' // Trim(s) // '">' // Trim(s)
WRITE(efu,FMT2) Trim(s)
END DO
WRITE(efu,*) '</tr>'
RETURN
END Subroutine WriteTextTableRows ! ------------------------------------------
!+
SUBROUTINE WriteBanner(efu)
! ------------------------------------------------------------------------------
! PURPOSE - Write the PDAS banner into the HTML file
INTEGER,INTENT(IN):: efu
!-------------------------------------------------------------------------------
WRITE(efu,*) '<div class="newbanner">'
WRITE(efu,*) 'Public Domain Aeronautical Software (PDAS) </div>'
RETURN
END Subroutine WriteBanner ! -------------------------------------------------
!+
SUBROUTINE WriteCrumb(efu, crumbTitle)
! ------------------------------------------------------------------------------
! PURPOSE- Write the crumb line showing the path to the current page
INTEGER,INTENT(IN):: efu
CHARACTER(LEN=*),INTENT(IN):: crumbTitle
!-------------------------------------------------------------------------------
WRITE(efu,*) '<nav class="crumb">'
WRITE(efu,*) '<a href="index.html">PDAS home</a> > '
WRITE(efu,*) '<a href="contents16.html">Contents</a> > '
WRITE(efu,*) '<a href="naca456.html">NACA Airfoil</a> > '
WRITE(efu,*) '<a href="avd.html">AVD Appendices</a> > '
WRITE(efu,*) Trim(crumbTitle)
WRITE(efu,*) '</nav>'
RETURN
END Subroutine WriteCrumb ! --------------------------------------------------
!+
SUBROUTINE WriteFooter(efu)
! ------------------------------------------------------------------------------
! PURPOSE - Write the footer, picking up address1 that contains the cuurent date
INTEGER,INTENT(IN):: efu ! external file unit for writing output
CHARACTER(LEN=*),PARAMETER:: DASH = "-"
CHARACTER(LEN=*),PARAMETER:: MONTH='JanFebMarAprMayJunJulAugSepOctNovDec'
CHARACTER(LEN=*),PARAMETER:: FMT1 = '(I4,A1,I2.2,A1,I2.2)'
CHARACTER(LEN=*),PARAMETER:: FMT2 = '(I4,1X,A3,1X,I2.0)'
CHARACTER(LEN=15):: s1,s2
CHARACTER(LEN=*),PARAMETER:: T1 = '<a href="order.html">Get a copy</a>' // &
' of all the programs from'
CHARACTER(LEN=*),PARAMETER:: T2 = &
'<cite>Public Domain Computer Programs for the Aeronautical Engineer.</cite><br />'
INTEGER,DIMENSION(8):: v
!-------------------------------------------------------------------------------
CALL DATE_AND_TIME(VALUES=v)
WRITE(s1,FMT1) v(1),DASH,v(2),DASH,v(3) ! current date in ISO 8601 format
WRITE(s2,FMT2) v(1), MONTH(3*v(2)-2:3*v(2)), v(3) ! human readable
WRITE(efu,*) '<footer>'
WRITE(efu,*) T1
WRITE(efu,*) T2
WRITE(efu,'(5A)') &
'Last updated: <time datetime="', TRIM(s1), '">',TRIM(s2), '</time>'
WRITE(efu,*) 'by Ralph Carmichael, pdaerowebmaster AT gmail DOT com.'
WRITE(efu,*) '</footer>'
RETURN
END Subroutine WriteFooter ! -------------------------------------------------
!+
SUBROUTINE WriteHead(efu,filename,title)
! ------------------------------------------------------------------------------
! PURPOSE -
INTEGER,INTENT(IN):: efu
CHARACTER(LEN=*),INTENT(IN):: filename
CHARACTER(LEN=*),INTENT(IN):: title
!-------------------------------------------------------------------------------
WRITE(efu,*) '<!DOCTYPE html>'
WRITE(efu,*) '<html lang="en-us">'
WRITE(efu,*) '<!-- www.pdas.com/'//filename//' called from avd page -->'
WRITE(efu,*) '<head>'
WRITE(efu,*) '<title>'//title//'</title>'
WRITE(efu,*) '<meta charset="utf-8" />'
WRITE(efu,*) '<meta name="generator" content="avd program (Fortran)" />'
WRITE(efu,*) '<meta name="author" content="Ralph Carmichael" />'
WRITE(efu,*) '<meta name="keywords" content= "NACA airfoil, AIAA-2001-5235,'// &
' profiles, meanlines, public domain, PDAS" />'
WRITE(efu,*) '<link rel="stylesheet" href="pdas.css" type="text/css" />'
WRITE(efu,*) '<link rel="stylesheet" href="pdasp.css" type="text/css" media="print" />'
WRITE(efu,*) '<style>'
! WRITE(efu,*) 'body {margin: 5px; color: black; background: white;'
! WRITE(efu,*) ' font-family: Arial,helvetica,sans-serif;}'
WRITE(efu,*) 'th {border: 1px solid black; text-align: center; ' // &
'border-collapse: collapse; }'
WRITE(efu,*) 'td {border: 1px solid black; text-align: right; ' // &
'border-collapse: collapse; }'
! WRITE(efu,*) 'td.center {text-align: center; }'
! WRITE(efu,*) 'td.links { padding: 2px; border-style: none}'
! WRITE(efu,*) 'h1 { font-family: arial,helvetica,univers,sans-serif;'
! WRITE(efu,*) ' font-size: 2em; font-weight: bold; color: blue;'
! WRITE(efu,*) ' text-align: center; margin-top: 0.5em; }'
WRITE(efu,*) '</style></head>'
RETURN
END Subroutine WriteHead ! ---------------------------------------------------
END Module AbbottVonDoenhoffSubs ! ===========================================
!+
MODULE MainProcedures
! ------------------------------------------------------------------------------
! PURPOSE - Collect
USE AbbottVonDoenhoffSubs
IMPLICIT NONE
INTEGER,PARAMETER:: HTML=1
! CHARACTER(LEN=*),PARAMETER:: ADDRESS2 = &
! ' by Ralph Carmichael <a href="mailto:pdaerowebmaster@gmail.com">pdaerowebmaster AT gmail DOT com</a>'
CHARACTER(LEN=*),PARAMETER:: PAUSENOTE = &
'Let the page finish loading before clicking on a section.<br />'
PUBLIC:: MainPage
PUBLIC:: Profiles
PUBLIC:: Meanlines
PUBLIC:: Sections45
PUBLIC:: Sections6
PUBLIC:: Sections6A
! PUBLIC:: Welcome
!-------------------------------------------------------------------------------
CONTAINS
!+
SUBROUTINE MainPage()
! ------------------------------------------------------------------------------
! PURPOSE - Write the main page with links to the other data pages
! There are links to profiles.html, meanline.html, sections45.html,
! sections6.html, sections6a.html
!-------------------------------------------------------------------------------
OPEN(UNIT=HTML, FILE='avd.html', STATUS='REPLACE', ACTION='WRITE')
CALL WriteHead(HTML, 'avd.html', 'Airfoil Tables')
WRITE(HTML,*) '<body>'
WRITE(HTML,*) '<div class="crumb">'
WRITE(HTML,*) '<a href="index.html">PDAS home</a> > '
WRITE(HTML,*) '<a href="contents16.html">Contents</a> > '
WRITE(HTML,*) '<a href="naca456.html">NACA Airfoil</a> > '
WRITE(HTML,*) 'AVD Appendices </div>'
! WRITE(HTML,*) &
! '<div class="newbanner">Public Domain Aeronautical Software (PDAS) </div>'
CALL WriteBanner(HTML)
WRITE(HTML,*) '<div id="header"><h1>Tables from Appendices I,II,III of '
WRITE(HTML,*) '<cite>Theory of Airfoil Sections</cite></h1></div>'
WRITE(HTML,*) '<p>The referenced book has three large appendices'
WRITE(HTML,*) 'containing tables of coordinates of a selection of NACA'
WRITE(HTML,*) 'profiles, mean lines and sections.</p>'
WRITE(HTML,*) '<p>This page and the linked pages reproduces these data'
WRITE(HTML,*) 'recomputed using the procedures of the PDAS program naca456'
WRITE(HTML,*) 'module.</p>'
WRITE(HTML,*) '<ul>'
WRITE(HTML,*) '<li><a href="profiles.html">Appendix I</a>- Profiles</li>'
WRITE(HTML,*) '<li><a href="meanlines.html">Appendix II</a>- Mean Lines</li>'
WRITE(HTML,*) '<li><a href="sections45.html">' // &
'Appendix III</a>- 4 and 5 digit Sections</li>'
WRITE(HTML,*) '<li><a href="sections6.html">' // &
'Appendix III</a>- 6-Series Sections</li>'
WRITE(HTML,*) '<li><a href="sections6a.html">' // &
'Appendix III</a>- 6A-Series Sections</li>'
WRITE(HTML,*) '</ul>'
CALL WriteFooter(HTML)
WRITE(HTML,*) '<nav>'
WRITE(HTML,*) '<a href="index.html">PDAS home</a> > '
WRITE(HTML,*) '<a href="contents16.html">Contents</a> > '
WRITE(HTML,*) '<a href="naca456.html">NACA Airfoil</a> > '
WRITE(HTML,*) 'AVD Appendices </nav>'
CALL WriteBanner(HTML)
WRITE(HTML,*) " </body></html>"
CLOSE(UNIT=HTML)
RETURN
END Subroutine MainPage ! ----------------------------------------------------
!+
SUBROUTINE Profiles(x)
! ------------------------------------------------------------------------------
! PURPOSE - Create a HTML file with the tables of profiles - Appendix I
USE AbbottVonDoenhoffSubs
REAL,INTENT(IN),DIMENSION(:):: x ! table of x-coor for calculation
! CHARACTER(LEN=*),PARAMETER:: DESCRIPTION = &
! '<meta name="description" content= "NACA Airfoil Profiles" />'
!-------------------------------------------------------------------------------
OPEN(UNIT=HTML,FILE='profiles.html',STATUS='REPLACE',ACTION='WRITE')
CALL WriteHead(HTML, 'profiles.html', 'Appendix I - Tables of Profiles')
WRITE(HTML,*) '<body class="profiles">'
WRITE(HTML,*) '<p><a id="TopProfiles"></a></p>'
CALL WriteCrumb(HTML, 'Profiles')
CALL WriteBanner(HTML)
WRITE(HTML,*) '<div id="header"><h1>Appendix I - Profiles</h1></div>'
WRITE(HTML,*) '<p><a href="avd.html">Go back to the AVD main page</a><br />'
! WRITE(HTML,*) PAUSENOTE
WRITE(HTML,*) '</p>'
WRITE(HTML,*) '<p>Four digit profiles<br />'
! CALL WriteTextTable(HTML, (/ &
! "0006", "0008", "0010", "0012", "0015", "0018", "0021" /), 7)
WRITE(HTML,*) '<a href="#p0006">0006</a> '
WRITE(HTML,*) '<a href="#p0008">0008</a> '
WRITE(HTML,*) '<a href="#p0010">0010</a> '
WRITE(HTML,*) '<a href="#p0012">0012</a> '
WRITE(HTML,*) '<a href="#p0015">0015</a> '
WRITE(HTML,*) '<a href="#p0018">0018</a> '
WRITE(HTML,*) '<a href="#p0021">0021</a></p>'
WRITE(HTML,*) '<p>Modified four digit profiles<br />'
! CALL WriteTextTable(HTML, (/ &
! "0008-34", "0010-34", "0010-35", "0010-64", &
! "0010-66", "0010-66", "0012-34", "0012-64" /), 4)
WRITE(HTML,*) '<a href="#p000834">0008-34</a> '
WRITE(HTML,*) '<a href="#p001034">0010-34</a> '
WRITE(HTML,*) '<a href="#p001035">0010-35</a> '
WRITE(HTML,*) '<a href="#p001064">0010-64</a> '
WRITE(HTML,*) '<a href="#p001065">0010-65</a> '
WRITE(HTML,*) '<a href="#p001066">0010-66</a> '
WRITE(HTML,*) '<a href="#p001234">0012-34</a> '
WRITE(HTML,*) '<a href="#p001264">0012-64</a></p>'
WRITE(HTML,*) '<p>16-series profiles<br />'
! CALL WriteTextTable(HTML, (/ &
! "16-006", "16-009", "16-012", "16-015", "16-018", "16-021" /), 6)
WRITE(HTML,*) '<a href="#p16006">16-006</a> '
WRITE(HTML,*) '<a href="#p16009">16-009</a> '
WRITE(HTML,*) '<a href="#p16012">16-012</a> '
WRITE(HTML,*) '<a href="#p16015">16-015</a> '
WRITE(HTML,*) '<a href="#p16018">16-018</a> '
WRITE(HTML,*) '<a href="#p16021">16-021</a></p>'
WRITE(HTML,*) '<p>63 series profiles<br />'
! CALL WriteTextTable(HTML,(/ &
! "63-006", "63-008", "63-009", "63-010", &
! "63-012", "63-015", "63-018", "63-021"/), 4)
WRITE(HTML,*) '<a href="#p63006">63-006</a> '