Skip to content

Commit

Permalink
Adding function to remove all energy
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyEarly committed Oct 4, 2023
1 parent eebba78 commit 507889f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Matlab/WaveVortexModel/@WVTransform/WVTransform.m
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@ function summarizeEnergyContent(self)
initWithRandomFlow(self)

removeEnergyFromAliasedModes(self,options)

removeAll(self)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Add and remove internal waves from the model
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
9 changes: 9 additions & 0 deletions Matlab/WaveVortexModel/@WVTransform/removeAll.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function removeAll(self)
% removes all energy from the model
%
% Simply sets Ap, Am, and A0 to zero.
% - Topic: Initial conditions — Waves
self.A0 = 0*self.A0;
self.Ap = 0*self.Ap;
self.Am = 0*self.Am;
end

0 comments on commit 507889f

Please sign in to comment.