irfu / irfu-matlab

Matlab routines to work with space data, particularly with MMS and Cluster/CAA data. Also some general plasma routines.
59 stars 46 forks source link

Whamp (matlab): No solution found for array of wavevectors #115

Open ikitcheng opened 1 year ago

ikitcheng commented 1 year ago

Step 1: Latest code?

Step 2: Describe your environment

Step 3: Describe the problem

For the example run (as in the whamp documentation): Solutions were found for certain arrays of wavevectors e.g.kperp=0, kpar = [0.0008 0.0002 0.0025]. But, if kperp=0, kpar = [0.0006 0.0002 0.0025], then no solutions were found, even though this set of wavevectors include the kperp and kpar points which did have solution before.

N.B. the numbers in the square bracket mean [k_start k_step k_end].

Expected behavior

For example run with kpar and kperp modified to: kperp=0, kpar = [0.0006 0.0002 0.0025] Output.flagSolutionFound = [0,1,1,1,1,1,1,1,1,1]

Actual behavior

For example run with k modified to: kperp=0, kpar = [0.0006 0.0002 0.0025] Output.flagSolutionFound = [0,0,0,0,0,0,0,0,0,0]

Steps to reproduce:

See "Relevant code" section below.

Relevant code:

To reproduce unexpected behaviour:

Oxygen = struct('m',16,'n',1,'t',10,'a',5,'vd',1);
Electrons = struct('m',0,'n',1,'t',100);
PlasmaModel = struct('B',100);
PlasmaModel.Species = {Oxygen,Electrons};
InputParameters = struct('fstart',0.1,'kperp',0,'kpar',[0.0006 0.0002 0.0025],'useLog',0);
Output = whamp.run(PlasmaModel,InputParameters)