|
23 | 23 | 'soborot_godunov_square_wave_16', ... |
24 | 24 | 'soborot_godunov_square_wave_32', ... |
25 | 25 | 'soborot_godunov_square_wave_64', ... |
26 | | - 'soborot_mp5_cos_wave_128', ... |
27 | | - 'soborot_mp5_cos_wave_16', ... |
28 | | - 'soborot_mp5_cos_wave_32', ... |
29 | | - 'soborot_mp5_cos_wave_64', ... |
30 | 26 | 'soborot_superbee_cos_wave_128', ... |
31 | 27 | 'soborot_superbee_cos_wave_16', ... |
32 | 28 | 'soborot_superbee_cos_wave_32', ... |
|
423 | 419 | set(gcf,'Position',[0 0 Paper_Width Paper_Height]); |
424 | 420 | print(gcf,'-dpdf',[plot_dir,'soborot_superbee_cos_wave']); |
425 | 421 |
|
426 | | -% FLUX_LIMITER='MP5' |
427 | | - |
428 | | -M = importdata([data_dir,'soborot_mp5_cos_wave_16_devc.csv'],',',2); |
429 | | -col_start = find(strcmp(M.colheaders,'"Y_TRACER-1"')); |
430 | | -col_end = find(strcmp(M.colheaders,'"Y_TRACER-16"')); |
431 | | -Y_mp5_16 = M.data(end,col_start:col_end); |
432 | | - |
433 | | -M = importdata([data_dir,'soborot_mp5_cos_wave_32_devc.csv'],',',2); |
434 | | -col_start = find(strcmp(M.colheaders,'"Y_TRACER-1"')); |
435 | | -col_end = find(strcmp(M.colheaders,'"Y_TRACER-32"')); |
436 | | -Y_mp5_32 = M.data(end,col_start:col_end); |
437 | | - |
438 | | -M = importdata([data_dir,'soborot_mp5_cos_wave_64_devc.csv'],',',2); |
439 | | -col_start = find(strcmp(M.colheaders,'"Y_TRACER-1"')); |
440 | | -col_end = find(strcmp(M.colheaders,'"Y_TRACER-64"')); |
441 | | -Y_mp5_64 = M.data(end,col_start:col_end); |
442 | | - |
443 | | -M = importdata([data_dir,'soborot_mp5_cos_wave_128_devc.csv'],',',2); |
444 | | -col_start = find(strcmp(M.colheaders,'"Y_TRACER-1"')); |
445 | | -col_end = find(strcmp(M.colheaders,'"Y_TRACER-128"')); |
446 | | -Y_mp5_128 = M.data(end,col_start:col_end); |
447 | | - |
448 | | -figure |
449 | | -set(gca,'Units',Plot_Units) |
450 | | -set(gca,'Position',[Plot_X Plot_Y Plot_Width Plot_Height]) |
451 | | -Y_exact = zeros(1,length(r_exact)); |
452 | | -i_range = find(r_exact>0.25 & r_exact<0.75); |
453 | | -Y_exact(i_range) = 0.5*(1. + cos(4.*pi*r_exact(i_range))); % see PERIODIC_TEST==13 in wall.f90 |
454 | | -H(1)=plot(r_exact,Y_exact,'k-'); hold on |
455 | | -H(2)=plot(r_16,Y_mp5_16,'bo-'); |
456 | | -H(3)=plot(r_32,Y_mp5_32,'m*-'); |
457 | | -H(4)=plot(r_64,Y_mp5_64,'r^-'); |
458 | | -H(5)=plot(r_128,Y_mp5_128,'gsq-'); |
459 | | - |
460 | | -xlabel('Radial Position (m)','Interpreter',Font_Interpreter,'FontSize',Label_Font_Size) |
461 | | -ylabel('Scalar Mass Fraction','Interpreter',Font_Interpreter,'FontSize',Label_Font_Size) |
462 | | -axis([0 1 0 1.2]) |
463 | | -text(.05,1.1,'MP5','FontName',Font_Name,'FontSize',Label_Font_Size) |
464 | | - |
465 | | -set(gca,'FontName',Font_Name) |
466 | | -set(gca,'FontSize',Label_Font_Size) |
467 | | - |
468 | | -lh=legend(H,'Exact','{\itn}=16','{\itn}=32','{\itn}=64','{\itn}=128'); |
469 | | -set(lh,'FontName',Font_Name,'FontSize',Key_Font_Size) |
470 | | -legend boxoff |
471 | | - |
472 | | -Git_Filename = [data_dir,'soborot_mp5_cos_wave_16_git.txt']; |
473 | | -addverstr(gca,Git_Filename,'linear') |
474 | | - |
475 | | -set(gcf,'Visible',Figure_Visibility); |
476 | | -set(gcf,'Units',Paper_Units); |
477 | | -set(gcf,'PaperUnits',Paper_Units); |
478 | | -set(gcf,'PaperSize',[Paper_Width Paper_Height]); |
479 | | -set(gcf,'Position',[0 0 Paper_Width Paper_Height]); |
480 | | -print(gcf,'-dpdf',[plot_dir,'soborot_mp5_cos_wave']); |
481 | | - |
482 | 422 | % plot error |
483 | 423 |
|
484 | 424 | Y_exact_16 = interp1(r_exact,Y_exact,r_16); |
|
496 | 436 | e_superbee_64 = norm(Y_superbee_64-Y_exact_64,1)/length(r_64); |
497 | 437 | e_superbee_128 = norm(Y_superbee_128-Y_exact_128,1)/length(r_128); |
498 | 438 |
|
499 | | -e_mp5_16 = norm(Y_mp5_16-Y_exact_16,1)/length(r_16); |
500 | | -e_mp5_32 = norm(Y_mp5_32-Y_exact_32,1)/length(r_32); |
501 | | -e_mp5_64 = norm(Y_mp5_64-Y_exact_64,1)/length(r_64); |
502 | | -e_mp5_128 = norm(Y_mp5_128-Y_exact_128,1)/length(r_128); |
503 | | - |
504 | 439 | dx = L./[16 32 64 128]; |
505 | 440 |
|
506 | 441 | figure |
|
510 | 445 | H(2)=loglog(dx,dx.^2,'k--'); |
511 | 446 | H(3)=loglog(dx,[e_charm_16 e_charm_32 e_charm_64 e_charm_128],'ko-'); |
512 | 447 | H(4)=loglog(dx,[e_superbee_16 e_superbee_32 e_superbee_64 e_superbee_128],'k*-'); |
513 | | -H(5)=loglog(dx,[e_mp5_16 e_mp5_32 e_mp5_64 e_mp5_128],'ksq-'); |
514 | 448 |
|
515 | 449 | % trap cosine wave error |
516 | 450 | if e_charm_128>2.9e-04 |
|
519 | 453 | if e_superbee_128>6.4e-04 |
520 | 454 | display(['Error: soborot_charm_square_wave_128 out of tolerance']) |
521 | 455 | end |
522 | | -if e_mp5_128>7.9e-05 |
523 | | - display(['Error: soborot_superbee_square_wave_128 out of tolerance']) |
524 | | -end |
525 | 456 |
|
526 | 457 | axis([min(dx) .1 min(dx.^2) max(dx)]) |
527 | 458 | xlabel('Grid Spacing (m)','Interpreter',Font_Interpreter,'FontSize',Label_Font_Size) |
|
531 | 462 | set(gca,'FontName',Font_Name) |
532 | 463 | set(gca,'FontSize',Label_Font_Size) |
533 | 464 |
|
534 | | -lh=legend(H,'{\itO}(\delta{\itx})','{\itO}(\delta{\itx}^2)','CHARM','Superbee','MP5'); |
| 465 | +lh=legend(H,'{\itO}(\delta{\itx})','{\itO}(\delta{\itx}^2)','CHARM','Superbee'); |
535 | 466 | set(lh,'Location','Southeast') |
536 | 467 | set(lh,'FontName',Font_Name,'FontSize',Key_Font_Size) |
537 | 468 | legend boxoff |
|
0 commit comments