"src/client/vscode:/vscode.git/clone" did not exist on "bbd72a6c979d387a9c5670c3dcbb157434f5cb5b"
Commit c0b0318b authored by ccfd's avatar ccfd
Browse files

first commit

parents
Apache License
Copyright Li Xinliang & Dang Guanlin
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Do not disclose the software source code to a third party without the consent of the software developer..
* If the software is used in scientific research or engineering applications or refers to its source code, it should be marked (quote or thanks, etc) in the relevant papers or reports.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
0.35639366 0.00000000 0.00000000 2.84000000
0.35679395 0.00673511 0.00001281 2.83681376
0.35720877 0.01363237 0.00002540 2.83351851
0.35763972 0.02069208 0.00003754 2.83010321
0.35808823 0.02791468 0.00004915 2.82655730
0.35855604 0.03530028 0.00006018 2.82286829
0.35904499 0.04284893 0.00007063 2.81902284
0.35955708 0.05056068 0.00008057 2.81500659
0.36009442 0.05843574 0.00009004 2.81080469
0.36065920 0.06647453 0.00009915 2.80640193
0.36125365 0.07467774 0.00010799 2.80178293
0.36188007 0.08304639 0.00011666 2.79693223
0.36254081 0.09158186 0.00012527 2.79183430
0.36323827 0.10028586 0.00013390 2.78647361
0.36397491 0.10916045 0.00014265 2.78083454
0.36475328 0.11820806 0.00015158 2.77490142
0.36557597 0.12743139 0.00016076 2.76865841
0.36644570 0.13683344 0.00017024 2.76208949
0.36736527 0.14641745 0.00018006 2.75517839
0.36833764 0.15618689 0.00019025 2.74790850
0.36936589 0.16614538 0.00020084 2.74026281
0.37045326 0.17629669 0.00021183 2.73222385
0.37160319 0.18664469 0.00022325 2.72377358
0.37281933 0.19719333 0.00023510 2.71489338
0.37410555 0.20794661 0.00024738 2.70556395
0.37546598 0.21890854 0.00026010 2.69576528
0.37690506 0.23008314 0.00027325 2.68547661
0.37842752 0.24147444 0.00028685 2.67467636
0.38003843 0.25308639 0.00030088 2.66334214
0.38174326 0.26492295 0.00031535 2.65145070
0.38354788 0.27698797 0.00033027 2.63897792
0.38545861 0.28928527 0.00034564 2.62589874
0.38748224 0.30181854 0.00036146 2.61218716
0.38962614 0.31459137 0.00037776 2.59781618
0.39189822 0.32760722 0.00039454 2.58275775
0.39430708 0.34086938 0.00041185 2.56698270
0.39686201 0.35438094 0.00042971 2.55046061
0.39957313 0.36814475 0.00044817 2.53315975
0.40245147 0.38216339 0.00046725 2.51504690
0.40550911 0.39643910 0.00048702 2.49608727
0.40875929 0.41097374 0.00050748 2.47624426
0.41221662 0.42576872 0.00052867 2.45547943
0.41589723 0.44082497 0.00055054 2.43375232
0.41981900 0.45614281 0.00057312 2.41102065
0.42400164 0.47172190 0.00059629 2.38724019
0.42846706 0.48756101 0.00062013 2.36236558
0.43323914 0.50365819 0.00064450 2.33634994
0.43834470 0.52001055 0.00066989 2.30914628
0.44381187 0.53661508 0.00069598 2.28070807
0.44967400 0.55346119 0.00072270 2.25098558
0.45596546 0.57053808 0.00075087 2.21993484
0.46272383 0.58783284 0.00078067 2.18751969
0.46998800 0.60533013 0.00081234 2.15371617
0.47779799 0.62301226 0.00084600 2.11851889
0.48619158 0.64086070 0.00088188 2.08195146
0.49520181 0.65885994 0.00092073 2.04407883
0.50485545 0.67699954 0.00096277 2.00500137
0.51518016 0.69526383 0.00100878 1.96483172
0.52620019 0.71361743 0.00105851 1.92369487
0.53792699 0.73198398 0.00111236 1.88177482
0.55038004 0.75030312 0.00117119 1.83921585
0.56358293 0.76852967 0.00123488 1.79615302
0.57756149 0.78661209 0.00130161 1.75270463
0.59237560 0.80448962 0.00136789 1.70889543
0.60812146 0.82209205 0.00143239 1.66466441
0.62491522 0.83933827 0.00149434 1.61993931
0.64288317 0.85613606 0.00155331 1.57466813
0.66215100 0.87238255 0.00161029 1.52885283
0.68282108 0.88796816 0.00166656 1.48258319
0.70495608 0.90277936 0.00172443 1.43605635
0.72848525 0.91668510 0.00178577 1.38969932
0.75302603 0.92956936 0.00186146 1.34443787
0.77814360 0.94141584 0.00194613 1.30105073
0.80379028 0.95216144 0.00202312 1.25955617
0.82973753 0.96165234 0.00210072 1.22022015
0.85523959 0.96982445 0.00217804 1.18388890
0.87960203 0.97668580 0.00224692 1.15116231
0.90224565 0.98231990 0.00230826 1.12233247
0.92273382 0.98683473 0.00236165 1.09746899
0.94077936 0.99035300 0.00240831 1.07647161
0.95623758 0.99301193 0.00244924 1.05912454
0.96910008 0.99495773 0.00248385 1.04512061
0.97948429 0.99633605 0.00251073 1.03408467
0.98762141 0.99728087 0.00253034 1.02560170
0.99381787 0.99790767 0.00254631 1.01924814
0.99841124 0.99831057 0.00256163 1.01461480
1.00172732 0.99856283 0.00257657 1.01132319
1.00405783 0.99871890 0.00258890 1.00904311
1.00565191 0.99881764 0.00259765 1.00750648
1.00671797 0.99888600 0.00260412 1.00650116
1.00741758 0.99894019 0.00260884 1.00586276
1.00786599 0.99898822 0.00261041 1.00546742
1.00814853 0.99903311 0.00260851 1.00522697
1.00833351 0.99907500 0.00260602 1.00508341
1.00846986 0.99911247 0.00260590 1.00499903
1.00858318 0.99914343 0.00260799 1.00494690
1.00868475 0.99916587 0.00261058 1.00490858
1.00878221 0.99917833 0.00261301 1.00487393
1.00887871 0.99918016 0.00261465 1.00483735
1.00897212 0.99917116 0.00261415 1.00479558
1.00906275 0.99915161 0.00261181 1.00474972
1.00915546 0.99912257 0.00260998 1.00470484
1.00925199 0.99908628 0.00261006 1.00466550
1.00934787 0.99904608 0.00261121 1.00463362
1.00943640 0.99900599 0.00261163 1.00460967
1.00951121 0.99896996 0.00260939 1.00459330
1.00956938 0.99894116 0.00260344 1.00458417
1.00961488 0.99892125 0.00259485 1.00458338
1.00965575 0.99890999 0.00258594 1.00459244
1.00969706 0.99890548 0.00257781 1.00461039
1.00973848 0.99890465 0.00256963 1.00463299
1.00977679 0.99890400 0.00255953 1.00465426
1.00981088 0.99890032 0.00254648 1.00466911
1.00984623 0.99889128 0.00253199 1.00467593
1.00989235 0.99887573 0.00251931 1.00467642
1.00995314 0.99885387 0.00251029 1.00467234
1.01002197 0.99882732 0.00250355 1.00466335
1.01008767 0.99879888 0.00249635 1.00464871
1.01014437 0.99877189 0.00248768 1.00463020
1.01019507 0.99874936 0.00247932 1.00461267
1.01024612 0.99873333 0.00247393 1.00460136
1.01029800 0.99872446 0.00247177 1.00459780
1.01034261 0.99872202 0.00246986 1.00459872
1.01037184 0.99872394 0.00246501 1.00459976
1.01038785 0.99872728 0.00245752 1.00460008
1.01040164 0.99872933 0.00245082 1.00460254
1.01042075 0.99872898 0.00244740 1.00460918
1.01044131 0.99872757 0.00244596 1.00461809
1.01045394 0.99872845 0.00244325 1.00462535
1.01045598 0.99873506 0.00243811 1.00462942
1.01045476 0.99874851 0.00243260 1.00463229
1.01045925 0.99876633 0.00242934 1.00463634
1.01047073 0.99878320 0.00242849 1.00464086
1.01048274 0.99879333 0.00242790 1.00464246
1.01049001 0.99879263 0.00242614 1.00463913
1.01049541 0.99877950 0.00242482 1.00463323
1.01050535 0.99875415 0.00242669 1.00462918
1.01051896 0.99871789 0.00243192 1.00462859
1.01052888 0.99867351 0.00243824 1.00462987
1.01053322 0.99862631 0.00244482 1.00463232
1.01053776 0.99858445 0.00245296 1.00463674
1.01054571 0.99855758 0.00246274 1.00464186
1.01055557 0.99855391 0.00247252 1.00464423
1.01056879 0.99857726 0.00248183 1.00464179
1.01058964 0.99862573 0.00249142 1.00463380
1.01061933 0.99869176 0.00250136 1.00461856
1.01065671 0.99876300 0.00251133 1.00459476
1.01070065 0.99882401 0.00252165 1.00456420
1.01074713 0.99885932 0.00253235 1.00453164
1.01078868 0.99885847 0.00254275 1.00450354
1.01081878 0.99882150 0.00255235 1.00448625
1.01083465 0.99876118 0.00256090 1.00448312
1.01083711 0.99869890 0.00256790 1.00449285
1.01083051 0.99865576 0.00257284 1.00451084
1.01082224 0.99864407 0.00257541 1.00453060
1.01081946 0.99866266 0.00257535 1.00454569
1.01082602 0.99869863 0.00257290 1.00455247
1.01084157 0.99873428 0.00256925 1.00455191
1.01086239 0.99875448 0.00256630 1.00454889
1.01088383 0.99875062 0.00256586 1.00454942
1.01090388 0.99872242 0.00256881 1.00455690
1.01092473 0.99867814 0.00257463 1.00456968
1.01095078 0.99863253 0.00258209 1.00458298
1.01098457 0.99860161 0.00259039 1.00459326
1.01102343 0.99859464 0.00259971 1.00460102
1.01106015 0.99860749 0.00261090 1.00460954
1.01108806 0.99862416 0.00262451 1.00462114
1.01110593 0.99862857 0.00263974 1.00463337
1.01111819 0.99861872 0.00265395 1.00463896
1.01113079 0.99861019 0.00266382 1.00463128
1.01114609 0.99862304 0.00266751 1.00461074
1.01116014 0.99866228 0.00266618 1.00458642
1.01116547 0.99870981 0.00266379 1.00457114
1.01115835 0.99873710 0.00266533 1.00457371
1.01114438 0.99872863 0.00267379 1.00459294
1.01113634 0.99869428 0.00268769 1.00461817
1.01114496 0.99865792 0.00270162 1.00463704
1.01117055 0.99863397 0.00271014 1.00464354
1.01120236 0.99861583 0.00271210 1.00464025
1.01122705 0.99858842 0.00271213 1.00463419
1.01123964 0.99855043 0.00271752 1.00463033
1.01124517 0.99852113 0.00273181 1.00462861
1.01125047 0.99852379 0.00275064 1.00462601
1.01125676 0.99856321 0.00276491 1.00462163
1.01125907 0.99862028 0.00276925 1.00462067
1.01125133 0.99866823 0.00276762 1.00463174
1.01123355 0.99869300 0.00277034 1.00465730
1.01121595 0.99869825 0.00278539 1.00468794
1.01121660 0.99869446 0.00281213 1.00470721
1.01125108 0.99868725 0.00284233 1.00470311
1.01131789 0.99867537 0.00286672 1.00467857
1.01139324 0.99865542 0.00288155 1.00465159
1.01144537 0.99862742 0.00288968 1.00464189
1.01145783 0.99859759 0.00289625 1.00465540
1.01144037 0.99857702 0.00290406 1.00468238
1.01141836 0.99857687 0.00291278 1.00470929
1.01141283 0.99860189 0.00292119 1.00472949
1.01143050 0.99864491 0.00292925 1.00474178
1.01146925 0.99868697 0.00293785 1.00474255
1.01152602 0.99870594 0.00294744 1.00472650
1.01159649 0.99869042 0.00295762 1.00469837
1.01167108 0.99864842 0.00296782 1.00468029
1.01173527 0.99860232 0.00297698 1.00469728
1.01177581 0.99857350 0.00298253 1.00475197
1.01179057 0.99856881 0.00298281 1.00481888
1.01179420 0.99858100 0.00298156 1.00486480
1.01181010 0.99859972 0.00298732 1.00487613
1.01185557 0.99861726 0.00300659 1.00486802
1.01193316 0.99862362 0.00303728 1.00486873
1.01203137 0.99860475 0.00306893 1.00489476
1.01213441 0.99855485 0.00309076 1.00494027
1.01223177 0.99848970 0.00310058 1.00498701
1.01231777 0.99844058 0.00310455 1.00501715
1.01238711 0.99842811 0.00311073 1.00502768
1.01243947 0.99844459 0.00312503 1.00503488
1.01248613 0.99846480 0.00314952 1.00505811
1.01254172 0.99846990 0.00318066 1.00509745
1.01260361 0.99845781 0.00320836 1.00513026
1.01264802 0.99843669 0.00322185 1.00513636
1.01266737 0.99841540 0.00322409 1.00512910
1.01270200 0.99839798 0.00323586 1.00514667
1.01279333 0.99838049 0.00327117 1.00519824
1.01291405 0.99835328 0.00331431 1.00524018
1.01299876 0.99831366 0.00334053 1.00523446
1.01302825 0.99827661 0.00335158 1.00521154
1.01302986 0.99826382 0.00336862 1.00523492
1.01302082 0.99827581 0.00339813 1.00531084
1.01300243 0.99828195 0.00342651 1.00537270
1.01298841 0.99825150 0.00344333 1.00535800
1.01300090 0.99819498 0.00345495 1.00527702
1.01305209 0.99815967 0.00347878 1.00520300
1.01313472 0.99817357 0.00352786 1.00520101
1.01320685 0.99820760 0.00359349 1.00526503
1.01321713 0.99821377 0.00364974 1.00533091
1.01317761 0.99818617 0.00368393 1.00535225
1.01317531 0.99815958 0.00371348 1.00534537
1.01325391 0.99815652 0.00375667 1.00535516
1.01331673 0.99816210 0.00379661 1.00539485
1.01326443 0.99814935 0.00381356 1.00546570
1.01313558 0.99810238 0.00382550 1.00560058
variables=y,d,u,v,T
0.00000000 0.35639366 0.00000000 0.00000000 2.84000000
0.01000000 0.35679395 0.00673511 0.00001281 2.83681376
0.02017415 0.35720877 0.01363237 0.00002540 2.83351851
0.03052548 0.35763972 0.02069208 0.00003754 2.83010321
0.04105709 0.35808823 0.02791468 0.00004915 2.82655730
0.05177210 0.35855604 0.03530028 0.00006018 2.82286829
0.06267371 0.35904499 0.04284893 0.00007063 2.81902284
0.07376518 0.35955708 0.05056068 0.00008057 2.81500659
0.08504980 0.36009442 0.05843574 0.00009004 2.81080469
0.09653095 0.36065920 0.06647453 0.00009915 2.80640193
0.10821204 0.36125365 0.07467774 0.00010799 2.80178293
0.12009656 0.36188007 0.08304639 0.00011666 2.79693223
0.13218805 0.36254081 0.09158186 0.00012527 2.79183430
0.14449011 0.36323827 0.10028586 0.00013390 2.78647361
0.15700641 0.36397491 0.10916045 0.00014265 2.78083454
0.16974069 0.36475328 0.11820806 0.00015158 2.77490142
0.18269673 0.36557597 0.12743139 0.00016076 2.76865841
0.19587841 0.36644570 0.13683344 0.00017024 2.76208949
0.20928964 0.36736527 0.14641745 0.00018006 2.75517839
0.22293443 0.36833764 0.15618689 0.00019025 2.74790850
0.23681685 0.36936589 0.16614538 0.00020084 2.74026281
0.25094103 0.37045326 0.17629669 0.00021183 2.73222385
0.26531118 0.37160319 0.18664469 0.00022325 2.72377358
0.27993159 0.37281933 0.19719333 0.00023510 2.71489338
0.29480661 0.37410555 0.20794661 0.00024738 2.70556395
0.30994068 0.37546598 0.21890854 0.00026010 2.69576528
0.32533832 0.37690506 0.23008314 0.00027325 2.68547661
0.34100410 0.37842752 0.24147444 0.00028685 2.67467636
0.35694271 0.38003843 0.25308639 0.00030088 2.66334214
0.37315888 0.38174326 0.26492295 0.00031535 2.65145070
0.38965747 0.38354788 0.27698797 0.00033027 2.63897792
0.40644337 0.38545861 0.28928527 0.00034564 2.62589874
0.42352161 0.38748224 0.30181854 0.00036146 2.61218716
0.44089726 0.38962614 0.31459137 0.00037776 2.59781618
0.45857551 0.39189822 0.32760722 0.00039454 2.58275775
0.47656163 0.39430708 0.34086938 0.00041185 2.56698270
0.49486097 0.39686201 0.35438094 0.00042971 2.55046061
0.51347900 0.39957313 0.36814475 0.00044817 2.53315975
0.53242127 0.40245147 0.38216339 0.00046725 2.51504690
0.55169342 0.40550911 0.39643910 0.00048702 2.49608727
0.57130119 0.40875929 0.41097374 0.00050748 2.47624426
0.59125043 0.41221662 0.42576872 0.00052867 2.45547943
0.61154709 0.41589723 0.44082497 0.00055054 2.43375232
0.63219721 0.41981900 0.45614281 0.00057312 2.41102065
0.65320696 0.42400164 0.47172190 0.00059629 2.38724019
0.67458260 0.42846706 0.48756101 0.00062013 2.36236558
0.69633049 0.43323914 0.50365819 0.00064450 2.33634994
0.71845713 0.43834470 0.52001055 0.00066989 2.30914628
0.74096910 0.44381187 0.53661508 0.00069598 2.28070807
0.76387311 0.44967400 0.55346119 0.00072270 2.25098558
0.78717601 0.45596546 0.57053808 0.00075087 2.21993484
0.81088472 0.46272383 0.58783284 0.00078067 2.18751969
0.83500632 0.46998800 0.60533013 0.00081234 2.15371617
0.85954800 0.47779799 0.62301226 0.00084600 2.11851889
0.88451708 0.48619158 0.64086070 0.00088188 2.08195146
0.90992099 0.49520181 0.65885994 0.00092073 2.04407883
0.93576732 0.50485545 0.67699954 0.00096277 2.00500137
0.96206376 0.51518016 0.69526383 0.00100878 1.96483172
0.98881815 0.52620019 0.71361743 0.00105851 1.92369487
1.01603847 0.53792699 0.73198398 0.00111236 1.88177482
1.04373284 0.55038004 0.75030312 0.00117119 1.83921585
1.07190950 0.56358293 0.76852967 0.00123488 1.79615302
1.10057687 0.57756149 0.78661209 0.00130161 1.75270463
1.12974347 0.59237560 0.80448962 0.00136789 1.70889543
1.15941802 0.60812146 0.82209205 0.00143239 1.66466441
1.18960935 0.62491522 0.83933827 0.00149434 1.61993931
1.22032646 0.64288317 0.85613606 0.00155331 1.57466813
1.25157851 0.66215100 0.87238255 0.00161029 1.52885283
1.28337482 0.68282108 0.88796816 0.00166656 1.48258319
1.31572486 0.70495608 0.90277936 0.00172443 1.43605635
1.34863828 0.72848525 0.91668510 0.00178577 1.38969932
1.38212489 0.75302603 0.92956936 0.00186146 1.34443787
1.41619468 0.77814360 0.94141584 0.00194613 1.30105073
1.45085778 0.80379028 0.95216144 0.00202312 1.25955617
1.48612455 0.82973753 0.96165234 0.00210072 1.22022015
1.52200549 0.85523959 0.96982445 0.00217804 1.18388890
1.55851130 0.87960203 0.97668580 0.00224692 1.15116231
1.59565286 0.90224565 0.98231990 0.00230826 1.12233247
1.63344125 0.92273382 0.98683473 0.00236165 1.09746899
1.67188771 0.94077936 0.99035300 0.00240831 1.07647161
1.71100373 0.95623758 0.99301193 0.00244924 1.05912454
1.75080096 0.96910008 0.99495773 0.00248385 1.04512061
1.79129125 0.97948429 0.99633605 0.00251073 1.03408467
1.83248669 0.98762141 0.99728087 0.00253034 1.02560170
1.87439954 0.99381787 0.99790767 0.00254631 1.01924814
1.91704231 0.99841124 0.99831057 0.00256163 1.01461480
1.96042771 1.00172732 0.99856283 0.00257657 1.01132319
2.00456867 1.00405783 0.99871890 0.00258890 1.00904311
2.04947834 1.00565191 0.99881764 0.00259765 1.00750648
2.09517012 1.00671797 0.99888600 0.00260412 1.00650116
2.14165762 1.00741758 0.99894019 0.00260884 1.00586276
2.18895471 1.00786599 0.99898822 0.00261041 1.00546742
2.23707548 1.00814853 0.99903311 0.00260851 1.00522697
2.28603427 1.00833351 0.99907500 0.00260602 1.00508341
2.33584568 1.00846986 0.99911247 0.00260590 1.00499903
2.38652456 1.00858318 0.99914343 0.00260799 1.00494690
2.43808602 1.00868475 0.99916587 0.00261058 1.00490858
2.49054542 1.00878221 0.99917833 0.00261301 1.00487393
2.54391841 1.00887871 0.99918016 0.00261465 1.00483735
2.59822089 1.00897212 0.99917116 0.00261415 1.00479558
2.65346905 1.00906275 0.99915161 0.00261181 1.00474972
2.70967936 1.00915546 0.99912257 0.00260998 1.00470484
2.76686857 1.00925199 0.99908628 0.00261006 1.00466550
2.82505374 1.00934787 0.99904608 0.00261121 1.00463362
2.88425221 1.00943640 0.99900599 0.00261163 1.00460967
2.94448162 1.00951121 0.99896996 0.00260939 1.00459330
3.00575993 1.00956938 0.99894116 0.00260344 1.00458417
3.06810541 1.00961488 0.99892125 0.00259485 1.00458338
3.13153663 1.00965575 0.99890999 0.00258594 1.00459244
3.19607251 1.00969706 0.99890548 0.00257781 1.00461039
3.26173229 1.00973848 0.99890465 0.00256963 1.00463299
3.32853554 1.00977679 0.99890400 0.00255953 1.00465426
3.39650217 1.00981088 0.99890032 0.00254648 1.00466911
3.46565244 1.00984623 0.99889128 0.00253199 1.00467593
3.53600697 1.00989235 0.99887573 0.00251931 1.00467642
3.60758673 1.00995314 0.99885387 0.00251029 1.00467234
3.68041305 1.01002197 0.99882732 0.00250355 1.00466335
3.75450764 1.01008767 0.99879888 0.00249635 1.00464871
3.82989260 1.01014437 0.99877189 0.00248768 1.00463020
3.90659039 1.01019507 0.99874936 0.00247932 1.00461267
3.98462388 1.01024612 0.99873333 0.00247393 1.00460136
4.06401632 1.01029800 0.99872446 0.00247177 1.00459780
4.14479139 1.01034261 0.99872202 0.00246986 1.00459872
4.22697316 1.01037184 0.99872394 0.00246501 1.00459976
4.31058613 1.01038785 0.99872728 0.00245752 1.00460008
4.39565523 1.01040164 0.99872933 0.00245082 1.00460254
4.48220581 1.01042075 0.99872898 0.00244740 1.00460918
4.57026367 1.01044131 0.99872757 0.00244596 1.00461809
4.65985506 1.01045394 0.99872845 0.00244325 1.00462535
4.75100670 1.01045598 0.99873506 0.00243811 1.00462942
4.84374574 1.01045476 0.99874851 0.00243260 1.00463229
4.93809984 1.01045925 0.99876633 0.00242934 1.00463634
5.03409712 1.01047073 0.99878320 0.00242849 1.00464086
5.13176620 1.01048274 0.99879333 0.00242790 1.00464246
5.23113619 1.01049001 0.99879263 0.00242614 1.00463913
5.33223671 1.01049541 0.99877950 0.00242482 1.00463323
5.43509791 1.01050535 0.99875415 0.00242669 1.00462918
5.53975044 1.01051896 0.99871789 0.00243192 1.00462859
5.64622550 1.01052888 0.99867351 0.00243824 1.00462987
5.75455483 1.01053322 0.99862631 0.00244482 1.00463232
5.86477072 1.01053776 0.99858445 0.00245296 1.00463674
5.97690602 1.01054571 0.99855758 0.00246274 1.00464186
6.09099417 1.01055557 0.99855391 0.00247252 1.00464423
6.20706917 1.01056879 0.99857726 0.00248183 1.00464179
6.32516562 1.01058964 0.99862573 0.00249142 1.00463380
6.44531873 1.01061933 0.99869176 0.00250136 1.00461856
6.56756431 1.01065671 0.99876300 0.00251133 1.00459476
6.69193881 1.01070065 0.99882401 0.00252165 1.00456420
6.81847929 1.01074713 0.99885932 0.00253235 1.00453164
6.94722348 1.01078868 0.99885847 0.00254275 1.00450354
7.07820976 1.01081878 0.99882150 0.00255235 1.00448625
7.21147718 1.01083465 0.99876118 0.00256090 1.00448312
7.34706545 1.01083711 0.99869890 0.00256790 1.00449285
7.48501500 1.01083051 0.99865576 0.00257284 1.00451084
7.62536695 1.01082224 0.99864407 0.00257541 1.00453060
7.76816313 1.01081946 0.99866266 0.00257535 1.00454569
7.91344612 1.01082602 0.99869863 0.00257290 1.00455247
8.06125922 1.01084157 0.99873428 0.00256925 1.00455191
8.21164650 1.01086239 0.99875448 0.00256630 1.00454889
8.36465277 1.01088383 0.99875062 0.00256586 1.00454942
8.52032366 1.01090388 0.99872242 0.00256881 1.00455690
8.67870557 1.01092473 0.99867814 0.00257463 1.00456968
8.83984570 1.01095078 0.99863253 0.00258209 1.00458298
9.00379210 1.01098457 0.99860161 0.00259039 1.00459326
9.17059364 1.01102343 0.99859464 0.00259971 1.00460102
9.34030003 1.01106015 0.99860749 0.00261090 1.00460954
9.51296187 1.01108806 0.99862416 0.00262451 1.00462114
9.68863063 1.01110593 0.99862857 0.00263974 1.00463337
9.86735867 1.01111819 0.99861872 0.00265395 1.00463896
10.04919926 1.01113079 0.99861019 0.00266382 1.00463128
10.23420662 1.01114609 0.99862304 0.00266751 1.00461074
10.42243589 1.01116014 0.99866228 0.00266618 1.00458642
10.61394319 1.01116547 0.99870981 0.00266379 1.00457114
10.80878559 1.01115835 0.99873710 0.00266533 1.00457371
11.00702119 1.01114438 0.99872863 0.00267379 1.00459294
11.20870907 1.01113634 0.99869428 0.00268769 1.00461817
11.41390936 1.01114496 0.99865792 0.00270162 1.00463704
11.62268322 1.01117055 0.99863397 0.00271014 1.00464354
11.83509289 1.01120236 0.99861583 0.00271210 1.00464025
12.05120168 1.01122705 0.99858842 0.00271213 1.00463419
12.27107403 1.01123964 0.99855043 0.00271752 1.00463033
12.49477546 1.01124517 0.99852113 0.00273181 1.00462861
12.72237266 1.01125047 0.99852379 0.00275064 1.00462601
12.95393348 1.01125676 0.99856321 0.00276491 1.00462163
13.18952695 1.01125907 0.99862028 0.00276925 1.00462067
13.42922329 1.01125133 0.99866823 0.00276762 1.00463174
13.67309395 1.01123355 0.99869300 0.00277034 1.00465730
13.92121163 1.01121595 0.99869825 0.00278539 1.00468794
14.17365030 1.01121660 0.99869446 0.00281213 1.00470721
14.43048520 1.01125108 0.99868725 0.00284233 1.00470311
14.69179290 1.01131789 0.99867537 0.00286672 1.00467857
14.95765128 1.01139324 0.99865542 0.00288155 1.00465159
15.22813960 1.01144537 0.99862742 0.00288968 1.00464189
15.50333849 1.01145783 0.99859759 0.00289625 1.00465540
15.78332999 1.01144037 0.99857702 0.00290406 1.00468238
16.06819755 1.01141836 0.99857687 0.00291278 1.00470929
16.35802610 1.01141283 0.99860189 0.00292119 1.00472949
16.65290202 1.01143050 0.99864491 0.00292925 1.00474178
16.95291323 1.01146925 0.99868697 0.00293785 1.00474255
17.25814915 1.01152602 0.99870594 0.00294744 1.00472650
17.56870077 1.01159649 0.99869042 0.00295762 1.00469837
17.88466066 1.01167108 0.99864842 0.00296782 1.00468029
18.20612301 1.01173527 0.99860232 0.00297698 1.00469728
18.53318365 1.01177581 0.99857350 0.00298253 1.00475197
18.86594006 1.01179057 0.99856881 0.00298281 1.00481888
19.20449145 1.01179420 0.99858100 0.00298156 1.00486480
19.54893873 1.01181010 0.99859972 0.00298732 1.00487613
19.89938457 1.01185557 0.99861726 0.00300659 1.00486802
20.25593345 1.01193316 0.99862362 0.00303728 1.00486873
20.61869165 1.01203137 0.99860475 0.00306893 1.00489476
20.98776730 1.01213441 0.99855485 0.00309076 1.00494027
21.36327043 1.01223177 0.99848970 0.00310058 1.00498701
21.74531296 1.01231777 0.99844058 0.00310455 1.00501715
22.13400878 1.01238711 0.99842811 0.00311073 1.00502768
22.52947377 1.01243947 0.99844459 0.00312503 1.00503488
22.93182579 1.01248613 0.99846480 0.00314952 1.00505811
23.34118480 1.01254172 0.99846990 0.00318066 1.00509745
23.75767282 1.01260361 0.99845781 0.00320836 1.00513026
24.18141401 1.01264802 0.99843669 0.00322185 1.00513636
24.61253466 1.01266737 0.99841540 0.00322409 1.00512910
25.05116331 1.01270200 0.99839798 0.00323586 1.00514667
25.49743070 1.01279333 0.99838049 0.00327117 1.00519824
25.95146986 1.01291405 0.99835328 0.00331431 1.00524018
26.41341614 1.01299876 0.99831366 0.00334053 1.00523446
26.88340724 1.01302825 0.99827661 0.00335158 1.00521154
27.36158326 1.01302986 0.99826382 0.00336862 1.00523492
27.84808674 1.01302082 0.99827581 0.00339813 1.00531084
28.34306271 1.01300243 0.99828195 0.00342651 1.00537270
28.84665871 1.01298841 0.99825150 0.00344333 1.00535800
29.35902486 1.01300090 0.99819498 0.00345495 1.00527702
29.88031390 1.01305209 0.99815967 0.00347878 1.00520300
30.41068121 1.01313472 0.99817357 0.00352786 1.00520101
30.95028490 1.01320685 0.99820760 0.00359349 1.00526503
31.49928582 1.01321713 0.99821377 0.00364974 1.00533091
32.05784762 1.01317761 0.99818617 0.00368393 1.00535225
32.62613680 1.01317531 0.99815958 0.00371348 1.00534537
33.20432277 1.01325391 0.99815652 0.00375667 1.00535516
33.79257788 1.01331673 0.99816210 0.00379661 1.00539485
34.39107749 1.01326443 0.99814935 0.00381356 1.00546570
35.00000000 1.01313558 0.99810238 0.00382550 1.00560058
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
FILE *fp;
MPI_File tmp_file;
MPI_Status status;
char str[100];
int _DOU = sizeof(double);
int my_id, n_processe;
int nx, ny, nz, N, NZ, *NPZ, *NP;
int nx_inlet, nx_flat, nx_conner_in, nx_conner_out, nx_reattach, nx_buff;
int ny_nearwall, ny_outer;
double *d1, *u1, *v1, *T1, *yy;
double *d2, *u2, *v2, *T2, *w2;
void mpi_init(int *Argc, char ***Argv);
void Read_parameter();
void Read_flow1d_inlet();
void Creat_flow2d();
void Output_flow3d();
void Finalize();
void output1d(int n, double *xx);
void output2d(int nx, int ny, double *xx);
int main(int argc, char *argv[]){
mpi_init(&argc , &argv);
Read_parameter();
Read_flow1d_inlet();
Creat_flow2d();
Output_flow3d();
Finalize();
return 0;
}
void mpi_init(int *Argc , char *** Argv){
MPI_Init(Argc, Argv);
MPI_Comm_rank(MPI_COMM_WORLD , &my_id);
MPI_Comm_size(MPI_COMM_WORLD, &n_processe);
N = n_processe;
}
void Read_parameter(){
if(my_id == 0){
if((fp = fopen("swept-compression-grid.in", "r")) == NULL){
printf("Can't open this file: 'swept-compression-grid.in'\n");
exit(0);
}
fgets(str, 100, fp);
fscanf(fp, "%d%d%d%d%d%d\n", &nx_inlet, &nx_flat, &nx_conner_in, &nx_conner_out, &nx_reattach, &nx_buff);
nx = nx_inlet + nx_flat + nx_conner_in + nx_conner_out + nx_reattach + nx_buff;
fgets(str, 100, fp);
fgets(str, 100, fp);
fgets(str, 100, fp);
fscanf(fp, "%d%d\n", &ny_nearwall, &ny_outer);
ny = ny_nearwall + ny_outer;
fgets(str, 100, fp);
fgets(str, 100, fp);
fgets(str, 100, fp);
fscanf(fp, "%d\n", &nz);
fclose(fp);
printf("Read_parameter is OK!\n");
printf("nx, ny, nz is %d, %d, %d\n", nx, ny, nz);
printf("The Number of total Processes is %d!\n", n_processe);
}
int tmp[4];
if(my_id == 0){
tmp[0] = nx;
tmp[1] = ny;
tmp[2] = nz;
tmp[3] = N;
}
MPI_Bcast(tmp, 4, MPI_INT, 0, MPI_COMM_WORLD);
if(my_id != 0){
nx = tmp[0];
ny = tmp[1];
nz = tmp[2];
N = tmp[3];
}
NZ = nz/N;
if(my_id < nz%N) NZ += 1;
NPZ = (int*)malloc(N * sizeof(int));
NP = (int*)malloc(N * sizeof(int));
memset((void*)NPZ, 0, N);
memset((void*)NP, 0, N);
for(int i = 0; i < N; i++){
if(i < nz%N){
NPZ[i] = (int)nz/N + 1;
}else{
NPZ[i] = (int)nz/N;
}
NP[0] = 0;
if(i != 0) NP[i] = NP[i-1] + NPZ[i-1];
}
yy = (double*)malloc(ny * _DOU);
d1 = (double*)malloc(ny * _DOU);
u1 = (double*)malloc(ny * _DOU);
v1 = (double*)malloc(ny * _DOU);
T1 = (double*)malloc(ny * _DOU);
d2 = (double*)malloc(nx * ny * _DOU);
u2 = (double*)malloc(nx * ny * _DOU);
v2 = (double*)malloc(nx * ny * _DOU);
w2 = (double*)malloc(nx * ny * _DOU);
T2 = (double*)malloc(nx * ny * _DOU);
if(my_id == 0) printf("Read_parameter is OK!\n");
}
void Read_flow1d_inlet(){
if(my_id == 0){
if((fp = fopen("flow1d-inlet.dat", "r")) == NULL){
printf("Can't open this file: 'flow1d-inlet.dat'\n");
exit(0);
}
fgets(str, 100, fp);
for(int j = 0; j < ny; j++){
fscanf(fp, "%lf%lf%lf%lf%lf\n", &yy[j], &d1[j], &u1[j], &v1[j], &T1[j]);
}
fclose(fp);
}
MPI_Bcast(yy, ny, MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(d1, ny, MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(u1, ny, MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(v1, ny, MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(T1, ny, MPI_DOUBLE, 0, MPI_COMM_WORLD);
if(my_id == 0) printf("Read flow1d-inlet.dat is OK!\n");
}
void Creat_flow2d(){
double (*pd2)[nx] = (double(*)[nx])(d2);
double (*pu2)[nx] = (double(*)[nx])(u2);
double (*pv2)[nx] = (double(*)[nx])(v2);
double (*pw2)[nx] = (double(*)[nx])(w2);
double (*pT2)[nx] = (double(*)[nx])(T2);
for(int j = 0; j < ny; j++){
for(int i = 0; i < nx; i++){
pd2[j][i] = d1[j];
pu2[j][i] = u1[j];
pv2[j][i] = v1[j];
pw2[j][i] = 0;
pT2[j][i] = T1[j];
}
}
if(my_id == 0) printf("Creat_flow2d is OK!\n");
}
#define FWRITE_MPI(ptr , size , num , stream){\
int _ENCODE_START = num * size;\
int _ENCODE_END = num * size;\
MPI_File_write(stream, &_ENCODE_START, 1, MPI_INT, &status);\
MPI_File_write(stream, ptr, size, MPI_DOUBLE, &status);\
MPI_File_write(stream, &_ENCODE_END, 1, MPI_INT, &status);\
}
void Output_flow3d(){
int nstep = 0;
int num = nx * ny;
int num_byte = nx * ny * sizeof(double);
double ntime = 0.;
int DI = sizeof(int) + sizeof(double);
MPI_File_open(MPI_COMM_WORLD, "flow3d0.dat", MPI_MODE_WRONLY | MPI_MODE_CREATE, MPI_INFO_NULL, &tmp_file);
MPI_File_seek(tmp_file, 0, MPI_SEEK_SET);
MPI_File_write_all(tmp_file, &DI, 1, MPI_INT, &status);
MPI_File_write_all(tmp_file, &nstep, 1, MPI_INT, &status);
MPI_File_write_all(tmp_file, &ntime, 1, MPI_DOUBLE, &status);
MPI_File_write_all(tmp_file, &DI, 1, MPI_INT, &status);
if(my_id == 0) printf("Write d ...\n");
MPI_File_seek(tmp_file, NP[my_id]*(num*sizeof(double) + 2*sizeof(int)), MPI_SEEK_CUR);
for(int k = 0; k < NZ; k++){
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
MPI_File_write(tmp_file, d2, num, MPI_DOUBLE, &status);
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
}
if(my_id == 0) printf("Write u ...\n");
MPI_File_seek(tmp_file, (nz-NZ)*(num*sizeof(double) + 2*sizeof(int)), MPI_SEEK_CUR);
for(int k = 0; k < NZ; k++){
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
MPI_File_write(tmp_file, u2, num, MPI_DOUBLE, &status);
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
}
if(my_id == 0) printf("Write v ...\n");
MPI_File_seek(tmp_file, (nz-NZ)*(num*sizeof(double) + 2*sizeof(int)), MPI_SEEK_CUR);
for(int k = 0; k < NZ; k++){
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
MPI_File_write(tmp_file, v2, num, MPI_DOUBLE, &status);
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
}
if(my_id == 0) printf("Write w ...\n");
MPI_File_seek(tmp_file, (nz-NZ)*(num*sizeof(double) + 2*sizeof(int)), MPI_SEEK_CUR);
for(int k = 0; k < NZ; k++){
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
MPI_File_write(tmp_file, w2, num, MPI_DOUBLE, &status);
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
}
if(my_id == 0) printf("Write T ...\n");
MPI_File_seek(tmp_file, (nz-NZ)*(num*sizeof(double) + 2*sizeof(int)), MPI_SEEK_CUR);
for(int k = 0; k < NZ; k++){
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
MPI_File_write(tmp_file, T2, num, MPI_DOUBLE, &status);
MPI_File_write(tmp_file, &num_byte, 1, MPI_INT, &status);
}
MPI_File_close(&tmp_file);
if(my_id == 0) printf("Wirte flow3d0.dat is OK!\n");
}
#undef FWRITE_MPI
void Finalize(){
free(yy);
free(d1);
free(u1);
free(v1);
free(T1);
free(d2);
free(u2);
free(v2);
free(w2);
free(T2);
MPI_Finalize();
}
void output1d(int n, double *xx){
for(int i = 0; i < n; i++){
printf("%d\t%lf\n", i, xx[i]);
}
}
void output2d(int nx, int ny, double *xx){
double (*x)[nx] = (double(*)[nx])(xx);
for(int j = 0; j < ny; j++){
for(int i =0; i < nx; i++){
printf("%d\t%d\t%lf\n", i, j, x[j][i]);
}
}
}
\ No newline at end of file
implicit none
integer,parameter:: SPLINE_INIT=-1, SPLINE_NORMAL=1
integer:: ny, ny1, j,tmp , Iflag
real*8,dimension(:),allocatable:: yy, d,u,v,T, yy1,d1,u1,v1,T1
print*, "interpolate 1d profiles for inlet (flow1d-inlet.dat)......"
print*, "origin data : flow1d-inlet.dat.origin (y,d,u,v,T), new coordinate y1d.dat"
print*, "please input ny (orginate grid number), ny1 (new) "
read(*,*) ny, ny1
allocate(yy(ny),d(ny),u(ny),v(ny),T(ny), yy1(ny1),d1(ny1),u1(ny1),v1(ny1),T1(ny1))
open(99,file="flow1d-inlet.dat.origin")
read(99,*)
do j=1, ny
read(99,*) yy(j), d(j), u(j), v(j), T(j)
enddo
close(99)
open(100,file="y1d.dat")
do j=1,ny1
read(100,*) yy1(j)
enddo
print*, " input 1 for 6th Lagrange interpolation; 2 for 3rd Spline interpolation "
read(*,*) Iflag
if(Iflag .eq. 1) then
print*, "Interpolation (6th Lagrange) ..."
do j=1,ny1
call inter1d_6th(yy1(j),d1(j),ny,yy,d)
call inter1d_6th(yy1(j),u1(j),ny,yy,u)
call inter1d_6th(yy1(j),v1(j),ny,yy,v)
call inter1d_6th(yy1(j),T1(j),ny,yy,T)
enddo
else
print*, "Interpolation (3rd Spline) ..."
!--------interpolation for d, u, v, T -------------
call spline(ny,yy,d,0.d0,0.d0,SPLINE_INIT)
do j=1,ny1
call spline(ny,yy,d,yy1(j),d1(j),SPLINE_NORMAL)
enddo
call spline(ny,yy,u,0.d0,0.d0,SPLINE_INIT)
do j=1,ny1
call spline(ny,yy,u,yy1(j),u1(j),SPLINE_NORMAL)
enddo
call spline(ny,yy,v,0.d0,0.d0,SPLINE_INIT)
do j=1,ny1
call spline(ny,yy,v,yy1(j),v1(j),SPLINE_NORMAL)
enddo
call spline(ny,yy,T,0.d0,0.d0,SPLINE_INIT)
do j=1,ny1
call spline(ny,yy,T,yy1(j),T1(j),SPLINE_NORMAL)
enddo
endif
!----------------------------------
open(99,file="flow1d-inlet.dat")
write(99,*) "variables=y, d, u, v, T"
do j=1,ny1
write(99,"(5F16.8)") yy1(j), d1(j), u1(j), v1(j), T1(j)
enddo
close(99)
open(99,file="flow-inlet.dat")
do j=1,ny1
write(99,"(4F16.8)") d1(j), u1(j), v1(j), T1(j)
enddo
close(99)
deallocate(yy,d,u,v,T, yy1,d1,u1,v1,T1)
end
!------------------------------------------------------------------------
! 6th order Langrage interpolation in one-dimension
subroutine inter1d_6th(x0, f0, nx, xx,ff)
implicit none
integer:: nx,k,k0,ik,ikm,km,ka,kb
real*8:: xx(nx),ff(nx), x0, f0, Ai(6)
if(x0<=xx(1)) then
f0=ff(1)
return
endif
if(x0>=xx(nx)) then
f0=ff(nx)
return
endif
k0=0
do k=1,nx
if(x0 >= xx(k) .and. x0 < xx(k+1) ) then
k0=k
goto 100
endif
enddo
100 continue
ka= max(4-k0,1)
kb= min(nx+3-k0,6)
f0=0.d0
do k=ka,kb
ik=k0+k-3
Ai(k)=1.d0
do km=ka,kb
ikm=k0+km-3
if(km .ne. k) Ai(k)=Ai(k)*(x0-xx(ikm))/(xx(ik)-xx(ikm))
enddo
f0=f0+Ai(k)*ff(ik)
enddo
end
! Spline interpolation
! eg.
! step1: call spline (n, xx,yy, x0, y0, SPLINE_INIT)
! Step2: call spline (n, xx, yy, x0, y0, SPLINE_NORMAL)
subroutine spline(n,xx,yy,x0,y0,Iflag)
implicit none
integer,parameter:: SPLINE_INIT=-1, SPLINE_NORMAL=1
integer,parameter:: Nmax=1000000
integer:: n,j,k, Iflag
integer,save:: Flag1=0
real*8:: xx(n), yy(n), x0,y0,hj
real*8:: a(n),b(n),c(n),d(n),h(n)
real*8,save:: MM(Nmax)
if(Iflag == SPLINE_INIT) then
Flag1=1
if(n > Nmax) then
print*, "Error !!! n> Nmax, please modify Nmax in subroutine spline() "
stop
endif
do j=2,n
h(j)=xx(j)-xx(j-1)
enddo
do j=2,n-1
a(j)=h(j)/(h(j)+h(j+1))
b(j)=2.d0
c(j)=h(j+1)/(h(j)+h(j+1))
d(j)=6.d0*((yy(j+1)-yy(j))/h(j+1)-(yy(j)-yy(j-1))/h(j))/(h(j)+h(j+1))
enddo
a(1)=0.d0 ; b(1)=1.d0 ; c(1)= 0.d0 ; d(1)=0.d0
a(n)=0.d0 ; b(n)=1.d0 ; c(n)=0.d0; d(n)=0.d0
call LU3(n,a,b,c,d,MM)
else
if(Flag1 .ne. 1) then
print*, "Error ! Spline interpolation is not initialized !, please run spline(,,,,,-1) first"
stop
endif
! call find_k(n,xx,x0,k)
call find_k_dichotomy(n,xx,x0,k)
j=k+1
hj=xx(j)-xx(j-1)
y0=(MM(j-1)*(xx(j)-x0)**3/6.d0+MM(j)*(x0-xx(j-1))**3/6.d0 &
+(yy(j-1)-MM(j-1)*hj*hj/6.d0)*(xx(j)-x0) + (yy(j)-MM(j)*hj*hj/6.d0)*(x0-xx(j-1)) ) /hj
endif
end
!--------------搜索插值区间: 线性搜索法 ---------------------------------
subroutine find_k(n,xx,x0,k)
implicit none
integer:: n,k,j
real*8 :: xx(n), x0
if(x0 <= xx(2)) then
k=1
else if(x0 >= xx(n-1)) then
k=n-1
else
do j=2,n-2
if( x0 >= xx(j) .and. x0<= xx(j+1)) then
k=j
goto 100
endif
enddo
100 continue
endif
end
!------------------------- 搜索插值区间: 二分法 ---------------------
subroutine find_k_dichotomy(n,xx,x0,k)
implicit none
integer:: n,k,kb,ke,k0
real*8 :: xx(n), x0
if(x0 <= xx(2)) then
k=1
else if(x0 >= xx(n-1)) then
k=n-1
else
kb=2
ke=n-1
do while( (ke-kb)>1)
k0=(kb+ke)/2
if(x0 <= xx(k0)) then
ke=k0
else
kb=k0
endif
enddo
k=kb
endif
end
! Chasing method (3-line LU ) for 3-line Eq
subroutine LU3(N,a,b,c,d,x)
implicit none
integer:: N,j
real*8,dimension(N):: a,b,c,d,x
real*8,dimension(N):: AA,BB
real*8:: tmp
AA(1)=0.d0
BB(1)=d(1)
x(N)=d(N)
x(1)=d(1)
do j=2,N
tmp=1.d0/(a(j)*AA(j-1)+b(j))
AA(j)=-c(j)*tmp
BB(j)=(d(j)-a(j)*BB(j-1))*tmp
enddo
do j=N-1,2,-1
x(j)=AA(j)*x(j+1)+BB(j)
enddo
end
# OpenCFD-SCU-Ver1.00 input file
GRID_3D = 25 240 20
PARALLEL_3D = 1 1 1
STREAM = 0
CHARTERIC = 0
TEST = 0
IPERIODIC = 0 0 1
JAC_BOUND = 1 1 1
DIF_BOUND = 0 1 0 1 0 0
NON_REFLETION = 0 1 0 1 0 0
SCHEME_INVIS = WENO7_SYMBO
#SCHEME_INVIS = NND2
SCHEME_VIS = CD8
#SCHEME_INVIS = SCHEME_HYBRIDAUTO
HY_DP_INTV = 0.01 0.2
HY_SMOOTH_DP = 0
HY_STYLE = 2
HY_PATCH_ZONE = 0
HY_ZONE0 = 10 25 100 240 5 20 20.0
RE = 5581.4
AMA = 2.9
GAMMA = 1.40
PR = 0.70
T_REF = 108.1
EPSL_SW = 0.0
DT = 0.01
END_TIME = 10
KSTEP_SHOW = 1
KSTEP_SAVE = 1000
INIT_STAT = 1
IBC = 108
#mzmax, mtmax, Inlet_boundary, If_wall_not_normal
BC_NPARA = 10 5 1 0
#Tw, epsl, x_dis_begin, x_dis_end, beta, x_wall_begin, x_up_bound_begin, SLZ
BC_RPARA = 2.84 0.2 -320. -300 0.1 -400. -50. 14.
#nstep_filter, Filter_X, Filter_Y, Filter_Z, ib, ie, jb, je, kb, ke, Filter_scheme // s0, rth, Filter_end_time
#FILTER_NPARA0 = 100 1 1 1 0 25 0 240 0 20 2
#FILTER_RPARA0 = 1.0 1.e-5 1000000
#ANA_EVENT0 = 101 1
#ANA_EVENT1 = 105 10
#ANA_NPARA1 = 2 5 10 15
#ANA_EVENT2 = 107 10
#ANA_NPARA0 = 0
#ANA_RPARA0 = 0
#*****************************************************************************************************
# IBC nk nr IF_symmetry IF_withleading Iflag_upperboundary AoA Tw epsl_wall epsl_upper wall_dis_begin wall_dis_end //(liftbody)
124 3 6 1 0 1 0. 3.797 0.02 0. 50. 60.
This diff is collapsed.
This diff is collapsed.
! read-flow v1.2 for compression conner
! Mach 2.9-24 compression corner
implicit doubleprecision (a-h,o-z)
real*8,allocatable,dimension(:,:,:):: d,u,v,w,T
real*8,allocatable,dimension(:,:):: d0,u0,v0,w0,T0,us0,yh
real*8,allocatable,dimension(:,:)::xx,yy
real*8,allocatable,dimension(:):: pw0,uvd,up,Ret,Ut,length
real*8 tt, length_min
integer istep,if_read_average
!------------------------------------------------------
open(33,file="opencfd.in")
do k=1,4
read(33,*)
enddo
read(33,*) nx,ny,nz
do k=1,7
read(33,*)
enddo
read(33,*) tmp, tmp, SLZ
read(33,*)
read(33,*) Re
close(33)
!------------------------------------------------------
allocate(d(nx,ny,nz),u(nx,ny,nz),v(nx,ny,nz),w(nx,ny,nz), T(nx,ny,nz))
allocate(d0(nx,ny),u0(nx,ny),v0(nx,ny),w0(nx,ny),T0(nx,ny),us0(nx,ny),yh(nx,ny))
allocate(xx(nx,ny),yy(nx,ny),pw0(nx),up(ny),uvd(ny),Ret(nx),Ut(nx),length(nx))
print*, "nx, ny ,nz =", nx,ny,nz
print*, "SLZ, Re=", SLZ,Re
!------------------------------------------------------
gamma=1.4d0
PI=3.14159265358979d0
seta0=24.d0*PI/180.d0 !conner angle
hz=SLZ/nz !展向周期边条
T_ref=108.1d0
Tsb=110.4/T_ref
Tw=2.84d0
Amu_w=1.0/Re*(1.0+Tsb)*sqrt(Tw**3)/(Tsb+Tw)
!---------read grid message ---------------------------
open(66,file="OCFD2d-Mesh.dat",form="unformatted")
read(66) xx
read(66) yy
close(66)
!---------read data file-------------------------------
pw0=0.d0;d0=0.d0;u0=0.d0;v0=0.d0;w0=0.d0;T0=0.d0
print*,"read opencfd.dat for (0) & read opencfd.dat.average for (1)"
read(*,*) if_read_average
if (if_read_average .eq. 1) then
open(33,file="opencfd.dat.average",form="unformatted")
else
open(33,file="opencfd.dat",form="unformatted")
end if
print*, 'reading data......'
read(33) Istep,tt
print*, "Istep,tt=",Istep,tt
call read3d(33,d,nx,ny,nz)
call read3d(33,u,nx,ny,nz)
call read3d(33,v,nx,ny,nz)
call read3d(33,w,nx,ny,nz)
call read3d(33,T,nx,ny,nz)
close(33)
print*, "read data OK ..."
!---------------------展项平均---------------------------------
do i=1,nx
do k=1,nz
pw0(i)=pw0(i)+d(i,1,k)*T(i,1,k)
enddo
enddo
do k=1,nz
do j=1,ny
do i=1,nx
d0(i,j)=d0(i,j)+d(i,j,k)
u0(i,j)=u0(i,j)+u(i,j,k)
v0(i,j)=v0(i,j)+v(i,j,k)
w0(i,j)=w0(i,j)+w(i,j,k)
T0(i,j)=T0(i,j)+T(i,j,k)
enddo
enddo
enddo
d0=d0/nz
u0=u0/nz
v0=v0/nz
w0=w0/nz
T0=T0/nz
pw0=pw0/nz
!------------------------------------------------------
if (if_read_average .eq. 1) then
open(44,file="pw-av.dat")
else
open(44,file="pw-ins.dat")
endif
write(44,*) "variables=x,p"
do i=1,nx
write(44,*) xx(i,1),pw0(i)
enddo
close(44)
!------------------------------------------------------
! do j=1,ny
! do i=1,nx
! if(xx(i,1) .le. 0) then
! seta=0.d0
! else
! seta=seta0
! endif
! yh(i,j)=sqrt( ( (xx(i,j)-xx(i,1)) * (1.d0-cos(seta)) ) **2 &
! +((yy(i,j)-yy(i,1))*(1.d0-sin(seta))) **2 )
! us0(i,j)=u0(i,j)*cos(seta)+v0(i,j)*sin(seta) !切向速度
! enddo
! enddo
!------------------------------------------------------
print*, "comput yh ..."
! seta2d=0.d0
yh=0.d0
do j=1,ny
! print*, "j=",j
do i=1,nx!控制流场动点
length_min=10000.d0
do iw=1,nx!控制壁面动点,搜寻两点间最短距离length
length(iw)=dsqrt((xx(i,j)-xx(iw,1))**2+(yy(i,j)-yy(iw,1))**2)
if(length(iw).le.length_min)then
length_min=length(iw)
! i0=iw
endif
enddo
yh(i,j)=length_min
! seta2d(i,j)=seta(i0)
if(xx(i,1) .le. 0)then
seta=0.d0
else
seta=seta0
end if
us0(i,j)=u0(i,j)*cos(seta)+v0(i,j)*sin(seta) !切向速度
enddo
enddo
!------------------------------------------------------
print*, "comput Cf ..."
if(if_read_average .eq. 1)then
open(55,file="cf-av.dat")
else
open(55,file="cf-ins.dat")
endif
do i=1,nx
us1=us0(i,2) ; us2=us0(i,3) ; h1=yh(i,2) ; h2=yh(i,3)
uy=(h2*h2*us1-h1*h1*us2)/(h2*h2*h1-h1*h1*h2)
tw=Amu_w*uy
Ut(i)=sqrt(abs(tw)/d0(i,1))
Ret(i)= d0(i,1)*Ut(i)/Amu_w
write(55,*) xx(i,1), 2.d0*tw, Ret(i)
enddo
close(55)
!------------------------------------------------------
print*, "Comput delt0, delt1, delt2 "
if (if_read_average .eq. 1) then
open(66,file="delta-av.dat")
else
open(66,file="delta-ins.dat")
endif
do i=1,nx
delt0=0.d0
delt1=0.d0
delt2=0.d0
do j=1,ny
if( us0(i,j) .gt. 0.99d0) goto 200
enddo
200 continue
j0=j-1
delt0= yh(i,j0) !边界层位移厚度
ue=us0(i,j0)
de=d0(i,j0)
!print*, " j_0.99 , ue, de =", j0-1 , ue, de
a1 = j0 + 0.0
do j=2,j0
delt1=delt1+(1.d0-d0(i,j)*us0(i,j)/(ue*de))*(yh(i,j)-yh(i,j-1))
delt2=delt2+d0(i,j)*us0(i,j)/(ue*de)*(1.d0-us0(i,j)/ue)*(yh(i,j)-yh(i,j-1))!动量边界层厚度
enddo
write(66,"(5f15.6)") a1,xx(i,1),delt0,delt1,delt2
enddo
close(66)
!------------------------------------------------------
print*, "output one-dimension profiles, please input i0 "
read(*,*) i0
print*, "x=",xx(i0,1)
if (if_read_average .eq. 1) then
open(99,file="U1d-av.dat")
else
open(99,file="U1d-ins.dat")
endif
uvd(1)=0.d0
up(1)=0.d0
write(99,*) "variables=yp,up,uvd,u_log"
do j=2,ny-1
yp=yh(i0,j)*Ret(i0)
up(j)=us0(i0,j)/ut(i0)
uvd(j)=uvd(j-1)+sqrt(d0(i0,j)/d0(i0,1))*(up(j)-up(j-1))
write(99,"(6f16.8)") yp, up(j),uvd(j),2.44*log(yp)+5.1d0
enddo
close(99)
if (if_read_average .eq. 1) then
open(100,file="U1da-av.dat")
else
open(100,file="U1da-ins.dat")
endif
do j=1,ny
write(100,"(6f16.8)") yh(i0,j),us0(i0,j),d0(i0,j),T0(i0,j)
enddo
close(100)
!------------------------------------------------------
if(if_read_average .eq. 1)then
print*,"writing flow2d_av..."
open(44,file="flow2d-av.dat")
write(44,*) "variables=x,y,d,u,v,w,T,p,s"
write(44,*) "zone i= ",nx, " j= ",ny
do j=1,ny
do i=1,nx
write(44,"(9f15.6)") xx(i,j),yy(i,j),d0(i,j),u0(i,j),v0(i,j),w0(i,j),T0(i,j), &
d0(i,j)*T0(i,j), T0(i,j)*d0(i,j)/d0(i,j)**gamma
enddo
enddo
close(44)
endif
!------------------------------------------------------
if(if_read_average .eq. 0)then
print*,"writing flow2d_xy..."
print*, "please input k"
read(*,*) k
open(44,file="flow2d_xy.dat")
write(44,*) "variables=x,y,z,d,u,v,w,T,p,s"
write(44,*) "zone i= ",nx, " j= ",ny
! k=nz/2+1
z=(k-1.)*hz
do j=1,ny
do i=1,nx
write(44,"(9f15.6)") xx(i,j),yy(i,j),z,d(i,j,k),u(i,j,k),v(i,j,k),w(i,j,k),T(i,j,k), &
d(i,j,k)*T(i,j,k),T(i,j,k)*d(i,j,k)/d(i,j,k)**gamma
enddo
enddo
close(44)
!------------------------------------------------------
print*,"writing flow2d_xz..."
print*, "please input j"
read(*,*) j
print*, "yn=", sqrt((xx(1,j)-xx(1,1))**2+(yy(1,j)-yy(1,1))**2)
open(44,file="flow2d_xz.dat")
write(44,*) "variables=x,y,z,d,u,v,w,T,p,s,us"
write(44,*) "zone i= ",nx, " j= ",nz
do k=1,nz
do i=1,nx
z=(k-1.)*hz
if(xx(i,j) .gt. 0 ) then
us=u(i,j,k)*cos(seta0)+v(i,j,k)*sin(seta0)
else
us=u(i,j,k)
endif
write(44,"(10f15.6)") xx(i,j),yy(i,j),z,d(i,j,k),u(i,j,k), &
v(i,j,k),w(i,j,k),T(i,j,k), &
d(i,j,k)*T(i,j,k), T(i,j,k)*d(i,j,k)/d(i,j,k)**gamma,us
enddo
enddo
close(44)
!------------------------------------------------------
print*,"writing flow2d_yz..."
print*, "please input i"
read(*,*) i
print*, "x=", xx(i,1)
open(44,file="flow2d_yz.dat")
write(44,*) "variables=x,y,z,d,u,v,w,T,p,s"
write(44,*) "zone i= ",ny, " j= ",nz
do k=1,nz
do j=1,ny
z=(k-1.)*hz
write(44,"(9f15.6)") xx(i,j),yy(i,j),z,d(i,j,k),u(i,j,k), &
v(i,j,k),w(i,j,k),T(i,j,k), &
d(i,j,k)*T(i,j,k), T(i,j,k)*d(i,j,k)/d(i,j,k)**gamma
enddo
enddo
close(44)
end if
!------------------------------------------------------
end
subroutine read3d(no,u,nx,ny,nz)
real*8 u(nx,ny,nz)
print*, "read 3d data ..."
do k=1,nz
read(no) u(:,:,k)
enddo
end
nx ny nz
25 240 20
nx_inlet nx_conner nx_buff
12 12 1
dx_inlet Lx_inlet Lx_conner alfax_buff
0.05 300. 50. 1.01
sw_angle comp_angle
0. 24.
High hy_wall Lz
35. 0.01 14.
Tecplot2D Mesh2D Tecplot3D
1 1 0
This diff is collapsed.
#ifndef __OCFD_COMPUTE_JACOBIAN3D_H
#define __OCFD_COMPUTE_JACOBIAN3D_H
#include "parameters.h"
#ifdef __cplusplus
extern "C"{
#endif
void Init_Jacobian3d();
void Comput_Jacobian3d();
void comput_Jac3d();
void boundary_Jac3d_Axx();
void boundary_Jac3d_Liftbody_Ajac();
void boundary_Jac3d_kernal_y_ramp_wall(REAL seta);
void boundary_Jac3d_kernal_z_cone_wall(REAL seta1, REAL seta2);
#if ((defined __NVCC__) || (defined __HIPCC__))
#include "cuda_commen.h"
__global__ void comput_Jac3d_kernal(
cudaField xi,cudaField xj,cudaField xk,cudaField yi,cudaField yj,cudaField yk,cudaField zi,cudaField zj,cudaField zk,cudaField Akx,
cudaField Aky,cudaField Akz,cudaField Aix,cudaField Aiy,cudaField Aiz,cudaField Asx,cudaField Asy,cudaField Asz,cudaField Ajac,
cudaJobPackage job);
#endif
#ifdef __cplusplus
}
#endif
#endif
\ No newline at end of file
#ifndef __OCFD_IO_H
#define __OCFD_IO_H
#include "stdio.h"
#include "parameters.h"
#ifdef __cplusplus
extern "C"{
#endif
void read_file(int Iflag_av , REAL * pd , REAL * pu , REAL * pv , REAL * pw , REAL * pT);
void OCFD_save(int Iflag_av, int Istep_name , REAL * pd , REAL * pu , REAL * pv , REAL * pw , REAL * pT);
void write_3d1(MPI_File pfile, MPI_Offset offset, REAL * pU);
void read_3d1(MPI_File pfile, MPI_Offset offset, REAL * pU);
#ifdef __cplusplus
}
#endif
#endif
#ifndef __OCFD_IO_MPI_H
#define __OCFD_IO_MPI_H
#include "parameters.h"
#ifdef __cplusplus
extern "C"{
#endif
void write_2d_XY(FILE * file, int ka, int size_x, int size_y, int lap, int *pU, REAL *pU1);
void write_2d_XYa(FILE * file, int ka, REAL *pU);
void write_2d_YZa(FILE * file, int ia, REAL *pU);
void write_2d_XZa(FILE * file, int ja, REAL *pU);
void write_points(FILE * file, REAL * pU, int mpoints, int *ia, int *ja, int *ka);
void read_3d(MPI_File file, MPI_Offset offset, REAL *pU);
void write_3d(MPI_File file, MPI_Offset offset, REAL *pU);
void write_blockdata(FILE * file, REAL * pU, int ib, int ie, int jb, int je, int kb, int ke);
#ifdef __cplusplus
}
#endif
#endif
#ifndef __OCFD_NS_JACOBIAN_H
#define __OCFD_NS_JACOBIAN_H
#include "parameters.h"
#include "cuda_commen.h"
#ifdef __cplusplus
extern "C"{
#endif
void du_invis_Jacobian3d_init(cudaJobPackage job_in, cudaStream_t *stream);
void du_invis_Jacobian3d_x(cudaJobPackage job_in, cudaSoA *fp, cudaSoA *fm, cudaStream_t *stream);
//void du_invis_Jacobian3d_x(cudaJobPackage job_in, cudaSoA *fp_x, cudaSoA *fm_x, cudaSoA *fp_y, cudaSoA *fm_y, cudaSoA *fp_z, cudaSoA *fm_z, cudaStream_t *stream);
void du_invis_Jacobian3d_y(cudaJobPackage job_in, cudaSoA *fp, cudaSoA *fm, cudaStream_t *stream);
void du_invis_Jacobian3d_z(cudaJobPackage job_in, cudaSoA *fp, cudaSoA *fm, cudaStream_t *stream);
void du_viscous_Jacobian3d_init(cudaStream_t *stream);
void du_viscous_Jacobian3d_x_init(cudaStream_t *stream);
void du_viscous_Jacobian3d_x_final(cudaJobPackage job_in, cudaStream_t *stream);
void du_viscous_Jacobian3d_y_init(cudaStream_t *stream);
void du_viscous_Jacobian3d_y_final(cudaJobPackage job_in, cudaStream_t *stream);
void du_viscous_Jacobian3d_z_init(cudaStream_t *stream);
void du_viscous_Jacobian3d_z_final(cudaJobPackage job_in, cudaStream_t *stream);
void boundary_symmetry_pole_vis_y(cudaStream_t *stream);
/* ============= */
void vis_flux_ker_x_warp();
void vis_flux_ker_y_warp();
void vis_flux_ker_z_warp();
void boundary_symmetry_pole_vis_y_warp();
typedef struct vis_flux_
{
cudaField uk;
cudaField vk;
cudaField wk;
cudaField ui;
cudaField vi;
cudaField wi;
cudaField us;
cudaField vs;
cudaField ws;
cudaField Tk;
cudaField Ti;
cudaField Ts;
cudaField Amu;
cudaField u;
cudaField v;
cudaField w;
cudaField Ax;
cudaField Ay;
cudaField Az;
cudaField Ajac;
cudaField Akx;
cudaField Aky;
cudaField Akz;
cudaField Aix;
cudaField Aiy;
cudaField Aiz;
cudaField Asx;
cudaField Asy;
cudaField Asz;
cudaField Ev1;
cudaField Ev2;
cudaField Ev3;
cudaField Ev4;
} vis_flux;
/* ===================== */
/*#if ((defined __NVCC__) || (defined __HIPCC__))
__global__ void vis_flux_ker(
cudaField Akx,cudaField Aky,cudaField Akz,cudaField Ajac,
cudaField s11,cudaField s12,cudaField s13,cudaField s22,cudaField s23,cudaField s33,cudaField E1,cudaField E2,cudaField E3,
cudaField Ev1,cudaField Ev2,cudaField Ev3,cudaField Ev4,
cudaJobPackage job);
__global__ void vis_flux_init_ker(
cudaField uk,cudaField vk,cudaField wk,cudaField Tk,cudaField ui,cudaField vi,cudaField wi,cudaField Ti,cudaField us,cudaField vs,cudaField ws,cudaField Ts,
cudaField Akx,cudaField Aky,cudaField Akz,cudaField Aix,cudaField Aiy,cudaField Aiz,cudaField Asx,cudaField Asy,cudaField Asz,
cudaField Amu,
cudaField u,cudaField v,cudaField w,
cudaField s11,cudaField s22,cudaField s33,cudaField s12,cudaField s13,cudaField s23,
cudaField E1,cudaField E2,cudaField E3,
cudaJobPackage job
);
__global__ void final_flux_ker(cudaSoA du , cudaField df1 , cudaField df2 , cudaField df3 , cudaField df4 , cudaField AJac, cudaJobPackage job);
#endif
*/
#ifdef __cplusplus
}
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment