acca-imperial / potk Goto Github PK
View Code? Open in Web Editor NEWA potential theory toolkit for MATLAB
License: GNU General Public License v3.0
A potential theory toolkit for MATLAB
License: GNU General Public License v3.0
Do we have any branch cut issues from combining potentials?
If a domain can provide a map to the unit disk, the potential should still be no problem to calculate. As a test, implement this with the unbounded circle domain.
Finite difference and the diff operation do not agree.
clear
dv=[0.0];
qv=[0.2];
beta=-3.0/4.0;
D = unitDomain(dv,qv,beta);
uf = uniformFlow(1.0,0.0,1.0);
w = potential(D,uf);
dw = diff(w);
delta = 0.000001;
dw2 = @(zeta) (w(zeta+delta)-w(zeta))/delta;
disp([dw(0.5i) dw2(0.5i)])
disp([abs(dw(0.3)) abs(dw2(0.3))])
output:
0.8110 - 0.4498i 0.0661 + 1.0438i
0.6077 0.1103
Add a uniformFlow
which would just be some sort of wrapper around dipole
where the image of the point at infinity is automatically used.
This should also be thrown on an eval call.
The derivative of the conformal map should be used. It's not now.
Since the introduction of sourcesAndSinks
, the source
and sourceSinkPair
should have been made subclasses of sourcesAndSinks
. Make this happen.
Should allow for a vectors of source and sink locations with corresponding vectors of strengths. The source/sink vectors should not have to be of equal length. If net sum of strengths is not zero and the formula doesn't break there should be a warning but not an error.
Use the builtin tempdir
call to get the base temporary directory instead of creating one inside the distribution directory. (PoTk.tempdir()
)
Use of analytic(W)
for W = potential(...)
triggers the creation of an m-file which contains the construction of the given potential w.r.t. the S-K prime function.
Subclass potential kind so that user can supply potential function and optionally derivative to add to potential.
Trying to create a uniform flow or dipole appears to return an error.
dv = [
5./12
-5./12
];
qv = [
1./6
1./6
];
beta = 0.0;
D = unitDomain(dv, qv, beta);
uf = uniformFlow(1, 0.0);
W = potential(D, uf);
returns:
Undefined function or variable 'greensC0Dpxy'.
Error in dipole/setupPotential (line 147)
d.greensXderivative = greensC0Dpxy(beta, 'x', D);
Error in uniformFlow/setupPotential (line 71)
uf = setupPotential@dipole(uf, W);
Error in potential (line 63)
pk = pk.setupPotential(W);
Until the prime function gets a proper parameter derivative, the m-file output is not able to properly express a dipole (or uniform flow).
Simply connected circulation reports mismatch between number of boundaries and supplied circulation strengths.
Any point singularity, pointVortex
, dipole
, source
, etc., should really be a subclass of a pointSingularity
superclass. This is because they all share the properties location
and strength
from which they can share structure display and conversion code. The dipole
adds an angle
property, but this can be handled just fine by overloading.
It seems the singularity correction factor was forgotten when writing the derivatives.
Either fix the FIXME or create an issue for it (and remove the label from the code).
Trying d = dipole(inf, x)
(location at infinity) and then trying to use potential(planeDomain, d)
gives invalid results on evaluation. This is because the use of the analytic formula algorithm does not check for infinity.
Connectivity 0 and 1 are special cases, and should be handled by each potential kind.
No warning should be given about missing scale in the case of the plane domain.
If the parameter is at the origin, when podoc
is called the output for G_0 should change to reflect this.
When beta is located on C0, the potential for a uniform flow should be formulated using G_j, (j ne 0) and not G0.
Because what if domain is entire plane?
Shouldn't the uniform flow for the plane domain have a dividing factor of 2*pi
?
Complains about non-existent property entirePlane
.
diff
crashes on circulation in simply connected case.
If unitDomain(dv,qv,beta) is called when beta is placed on a boundary an error is returned. However, this is required when, i.e. z=(1-zeta)/(1+zeta).
Add useful help text in class files and functions where it's missing.
Since unitDomain()
is a valid call for a single boundary domain, the conformal maps (identity et al.) should still be set.
Uniform flow and dipole throw error in the case of the simply connected domain.
The code should not be calling the prime function code in the simply connected case, since this can be written analytically.
Should potentialKind
have declared getDerivativeEntireDomain
as an abstract function? I can't recall if a missing definition for this function is handled properly somewhere else.
Class unitDomain
has a placeholder for conformal maps (and inverses and derivatives), but nothing is done with this currently. Should it stay or will it be useful?
This shouldn't be possible (directly) in a simply connected domain.
Circulation computation uses the first kind integrals, which is a simplification of the expression in terms of the Green's functions. But a constant has been dropped along the way. It needs to be put back.
The command podoc(W)
for W = potential(...)
should open a window with the analytic description of the generated potential.
The arrayfun
output in the evaluation method needs to have UniformOutput
set to false
, since we can output arrays. This output then needs run through cell2mat
so it can be summed.
The SK prime function should take points inside circles in the unit disk, specifically the image under the "theta-j" maps of a point in the unit domain.
Until the prime code will take such a point (and then use Hejal's identity to get the computation right), the m-file output code cannot build, from the prime function, the "G_j" functions needed to properly express circulation.
Toolkit will now only focus on the unit (or entire plane) domain.
Need to update help text following addition of scale parameter.
Should just get some expected values from development testing and code them into the unit tests.
This will need some sort of "canary" to warn when the SKPrime code gives differing values than a "baseline". Example: just before this writing, the Green's functions were normalised where they hadn't been before. Changing normalisation values from SKPrime could result in potential function values different than expected.
Change PoTk.ErrorTypeString
to PoTk.ErrorIdString
.
When creating a uniform flow the scaling coefficient should be automatically approximated unless an optional user supplied scaling coefficient is supplied.
Since the spectral parameter derivative is now implemented in SKPrime, it should be used here instead of finite difference.
Circulation is trying to use the first kind integrals in the simply connected case. An analytic formula should instead be employed.
Should it just keep a repository copy and use git, or do an "overwrite" self-update?
Use prime function defined slit map instead of external circles.
It's not clear how to automate this in a most cases past the first order derivative. So limiting implementation to order 1 for now.
Need install/uninstall script to modify path information.
If MathJax is installed locally, use it.
Should the PoTk install script just grab a copy of MathJax?
Where should the configuration be stored for the MathJax location? The XSL file will need to be modified accordingly.
The U
variable is not getting set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.