-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meshfree Shallow Water on a Sphere #25
base: master
Are you sure you want to change the base?
Conversation
methods | ||
function obj = Canonical(varargin) | ||
|
||
load('mesh4000.mat', 'lambda', 'phi'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems strange that the meshfree shallow water is loading a mesh
H = 5.768e4; | ||
% earth gravity | ||
g = 9.8; | ||
% radius of the earth | ||
a = 6.370e6; | ||
% initial velocity | ||
u0 = 20; | ||
% Angular speed of the earth | ||
Omega = 7.292e-5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use otp.utils.PhysicalConstants
|
||
%% Do the rest | ||
|
||
oneday = 24*60*60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use otp.utils.PhysicalConstants
obj.PlottingInterp = Wplot; | ||
obj.PlottingLatitude = plotlatitude; | ||
obj.PlottingLongitude = plotlongitude; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be computed in a plot function to narrow their scope
|
||
methods | ||
|
||
function plotSphere(obj, huv, projection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent passing of axes to plotting functions
…d work with significantly less points
|
||
coriolisForce = 2*Omega*z; | ||
|
||
params = struct; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary line
params.rbf = @otp.utils.rbf.buhmann3; | ||
|
||
% convert from Cartesian to spherical coordinates | ||
theta = atan2(z, sqrt(x.^2 + y.^2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use hypot function
This is a meshfree method. It is not yet ready to merge, but I wanted to get something up just in case I start using it soon.