| 1 | function plot_transient_results(md,options,width,i)
|
|---|
| 2 | %PLOT_TRANSIENT_RESULTS - plot transient results
|
|---|
| 3 | %
|
|---|
| 4 | % Usage:
|
|---|
| 5 | % plot_transient_results(md,options,width,i);
|
|---|
| 6 | %
|
|---|
| 7 | % See also: PLOTMODEL
|
|---|
| 8 |
|
|---|
| 9 | fontsize=getfieldvalue(options,'fontsize',14);
|
|---|
| 10 | fontweight=getfieldvalue(options,'fontweight','n');
|
|---|
| 11 |
|
|---|
| 12 | %Prepare window distribution
|
|---|
| 13 | %Get screen geometry
|
|---|
| 14 | mp = get(0, 'MonitorPositions');
|
|---|
| 15 | %Build window sizes
|
|---|
| 16 | if size(mp,1)>=2 %several monitors, use the second one
|
|---|
| 17 | bdwidth=mp(2,1)+5; topbdwidth=mp(2,2)+20; W=mp(2,3)/3; H=mp(2,4)/2;
|
|---|
| 18 | else %only one monitor
|
|---|
| 19 | bdwidth=5; topbdwidth=20; W=mp(1,3)/3; H=mp(1,4)/2;
|
|---|
| 20 | end
|
|---|
| 21 | pos1=[bdwidth H+bdwidth W-2*bdwidth H-bdwidth-topbdwidth];
|
|---|
| 22 | pos2=pos1+[W 0 0 0]; pos3=pos1+[2*W 0 0 0]; pos4=pos1+[0 -H 0 0]; pos5=pos1+[W -H 0 0]; pos6=pos1+[2*W -H 0 0];
|
|---|
| 23 | %Create windows
|
|---|
| 24 | figure(1);close;
|
|---|
| 25 | figure('Position',pos1); figure('Position',pos2);figure('Position',pos3);figure('Position',pos4);figure('Position',pos5);figure('Position',pos6);
|
|---|
| 26 |
|
|---|
| 27 | string='plotmodel(md';
|
|---|
| 28 | for i=1:length(md.results.transient),
|
|---|
| 29 | string=[string ',''data'',md.results.transient(' num2str(i) ').thickness,''title'',''Thickness at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 30 | end
|
|---|
| 31 | string=[string ',''figure'',1,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 32 | eval(string);
|
|---|
| 33 | clear string;
|
|---|
| 34 |
|
|---|
| 35 | string='plotmodel(md';
|
|---|
| 36 | for i=1:length(md.results.transient),
|
|---|
| 37 | string=[string ',''data'',md.results.transient(' num2str(i) ').vel,''view'',3,''title'',''Velocity at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 38 | end
|
|---|
| 39 | string=[string ',''figure'',2,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 40 | eval(string);
|
|---|
| 41 | clear string;
|
|---|
| 42 |
|
|---|
| 43 | if dimension(md.mesh)==3,
|
|---|
| 44 | string='plotmodel(md';
|
|---|
| 45 | for i=1:length(md.results.transient),
|
|---|
| 46 | string=[string ',''data'',md.results.transient(' num2str(i) ').temperature,''view'',3,''title'',''Temperature at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 47 | end
|
|---|
| 48 | string=[string ',''figure'',3,''colorbar#all'',''on'',''view'',3,''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 49 | eval(string);
|
|---|
| 50 | clear string;
|
|---|
| 51 | end
|
|---|
| 52 |
|
|---|
| 53 | string='plotmodel(md';
|
|---|
| 54 | for i=2:length(md.results.transient),
|
|---|
| 55 | string=[string ',''data'',md.results.transient(' num2str(i) ').thickness-md.results.transient(' num2str(i-1) ').thickness,''title'',''Delta thickness at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 56 | end
|
|---|
| 57 | string=[string ',''figure'',4,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 58 | eval(string);
|
|---|
| 59 | clear string;
|
|---|
| 60 |
|
|---|
| 61 | string='plotmodel(md';
|
|---|
| 62 | for i=2:length(md.results.transient),
|
|---|
| 63 | string=[string ',''data'',md.results.transient(' num2str(i) ').vel-md.results.transient(' num2str(i-1) ').vel,''view'',3,''title'',''Delta velocity at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 64 | end
|
|---|
| 65 | string=[string ',''figure'',5,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 66 | eval(string);
|
|---|
| 67 | clear string;
|
|---|
| 68 |
|
|---|
| 69 | if dimension(md.mesh)==3,
|
|---|
| 70 | string='plotmodel(md';
|
|---|
| 71 | for i=2:length(md.results.transient),
|
|---|
| 72 | string=[string ',''data'',md.results.transient(' num2str(i) ').temperature-md.results.transient(' num2str(i-1) ').temperature,''view'',3,''title'',''Delta temperature at time ' num2str(md.results.transient(i).time) ' a'''];
|
|---|
| 73 | end
|
|---|
| 74 | string=[string ',''figure'',6,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
|
|---|
| 75 | eval(string);
|
|---|
| 76 | clear string;
|
|---|
| 77 | end
|
|---|