Skip to content

Commit

Permalink
updated restart and post-processing to show reconstructed drag
Browse files Browse the repository at this point in the history
  • Loading branch information
kent0 committed Jul 25, 2024
1 parent 2137bb3 commit 64fa95d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
8 changes: 3 additions & 5 deletions examples/cyl/cyl_rom.usr
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ c-----------------------------------------------------------------------
include 'MOR'

param(170) = -1
nsteps = 25 * 1e3 ! reduce to 100 CTUs

call rom_update

Expand Down Expand Up @@ -201,11 +202,8 @@ c-----------------------------------------------------------------------
include 'MOR'

if (ad_step.eq.0) then
call copy(u,uk,nb+1)
c call rzero(u,nb+1)
c if (nid.eq.0) call copy(u,uk,nb+1)

c call gop(u,ut,'+ ',nb+1)
isnap = 100 ! restart from 401 CTU snapshot
call copy(u,uk(1+(isnap-1)*(nb+1)),nb+1)
endif

return
Expand Down
18 changes: 13 additions & 5 deletions examples/cyl/post.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@
ry=dlmread('rom.dragy.dat');

% plot fom result:

tstart=401;
tend=500;

figure;
plot(fx(:,2),fx(:,3)); xlim([400 500]);
title('FOM drag result');
plot(fx(:,2),fx(:,3)); xlim([tstart tend]);
title('Drag result');
xlabel('Time');
ylabel('Drag');

% plot rom result:
figure;
plot(rx(:,1),rx(:,4)); xlim([400 500]);
title('ROM drag result');
%figure;
hold on
rx(:,1)=rx(:,1)+tstart; % restart from t=400
%plot(rx(:,1),rx(:,4)); xlim([400 500]);
plot(rx(:,1),rx(:,4),'--');
legend('FOM','ROM');
%title('ROM drag result');
xlabel('Time');
ylabel('Drag');

0 comments on commit 64fa95d

Please sign in to comment.