Skip to content
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

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

AndreyAPopov
Copy link
Member

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.

methods
function obj = Canonical(varargin)

load('mesh4000.mat', 'lambda', 'phi');
Copy link
Member

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

Comment on lines 8 to 16
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;
Copy link
Member

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;
Copy link
Member

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

Comment on lines 112 to 114
obj.PlottingInterp = Wplot;
obj.PlottingLatitude = plotlatitude;
obj.PlottingLongitude = plotlongitude;
Copy link
Member

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)
Copy link
Member

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


coriolisForce = 2*Omega*z;

params = struct;
Copy link
Member

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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use hypot function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants