Giter Club home page Giter Club logo

merging-filaments's People

Contributors

bendudson avatar

Watchers

 avatar  avatar  avatar

Forkers

dschwoerer

merging-filaments's Issues

Is merging filaments in 3D possible?

Hi,

I am trying to run the merging filaments. I would like to see 3D effects of the merging filaments such as kink instability. I just simply tried to change ny = 1 to ny = 10 and did not work as expected. I think significant modification of the code might be required. Is it right? Is there a simpler way for me to try 3D merging filaments?

Thanks!

Erroneous results from the examples

I'm sorry to continuously bother you with problems I've had with running the code, but the results I get from these examples don't seem correct, and I cannot figure out what could be wrong.
I have been comparing the results to the graphs in 170215-merging-flux.pdf. In the case of the single rope in cylindrical coordinates, the value of the central flux is too low and it changes in the wrong direction:
single_fresh_flux

When I plot the parallel current in X and Z, the initial X distribution seems to have the correct shape and size, but it does not decrease by enough at t=5s (it barely changes at all when it should have been spreading out along X) and then the distribution at t=500s actually has a lower peak, and doesn't spread by enough.
single_fresh_jpar_x

The distribution of the parallel current along Z is worse, however: it has large negative steps at the edge of the distribution. Similar to that along X, the distribution does not change greatly at t=5s, and the peak is too low at t=500s. In this case the distribution should have become more narrow as the simulation progressed.
single_fresh_jpar_z

I had thought that the example outlined in 170215-merging-flux.pdf had different parameters (since Bxy is set to 1T rather than 0.5T as it was in the document) and so I have tried to vary the parameters to recover those graphs.
I found that if I changed Bxy to 0.5T and multiplied the Jpar distribution by a factor of -2, I could recover something more correct for the change in flux over time (although the actual change is ~2x what it should be):
single_0 5B_4nJ_flux

And in this case the Jpar distributions are inverted and are around double what they should be:
single_0 5B_4nJ_jpar_x
single_0 5B_4nJ_jpar_z

If I reduce the factor I multiply Jpar to -1, the flux has a more correct change in value over the simulation, but its starting value is around half of what it should be. Similarly, the Jpar distributions' starting peak values are of the correct magnitude but the distributions are still inverted.
If I remove the Bxy scaling from the dx variable, so that it is equal to

dx = Lx / nx

instead of

dx = Bxy * Lx / nx

I find that at least one of the current distributions gets narrower as the calculation proceeds, but in this case it is the wrong one, the current distribution gets narrower along X and wider along Z rather than vice versa:
single_5000dt_nJ_jpar_x
single_5000dt_nJ_jpar_z

I have also had difficulty in carrying out the merging example. I found that the merging process itself occurred much too quickly and the change in central flux is once again much too small and in the wrong direction:
merge_flux_orig

This can also be seen in the plots of the parallel current, in which the merging can be seen to occur too early, result in current distributions that are too small, and have a post merging distribution that is quite different (i.e. the the ring of zero current around the centre):
merge_orig-j-t000
merge_orig-j-t020
merge_orig-j-t040
merge_orig-j-t100
merge_orig-j-t200
merge_orig-j-t300

I found that if I increased the current, changed the resistivity and viscosity to the values mentioned in Stanier (2013) and decreased the grid size to that in the example I could get a change in centroid flux that is closer to what is shown there, but the merging still occurs much too quickly:
image

Do you know what I am doing wrong here? Or what the issue with my code could be? I have tried adjusting everything but I cannot seem to recover the results from the examples.
I am using the BOUT-dev version, with the configuration:

configure: -------------------------
configure: Configuration summary
configure: -------------------------
configure: PETSc support : no (has SUNDIALS: no)
configure: SLEPc support : no
configure: IDA support : yes
configure: CVODE support : yes
configure: ARKODE support : yes
configure: FFTW support : yes
configure: NetCDF support : yes
configure: Parallel-NetCDF support : no
configure: HDF5 support : yes (parallel: no)
configure: MUMPS support : no
configure: Lapack support : yes
configure: Scorep support : no
configure: OpenMP support : no (schedule: )
configure: Natural language support: yes (path: ${datarootdir}/locale)
configure: System UUID generator : no
configure:

Although I have also compiled it with the PetSc library, it did not seem to make any difference.
Thank you, and I am sorry again for the trouble.

Error in merging-filaments

Hi,

I've got an error while doing this simulation. The error is as below. I would appreciate if you give me any comment on this. Thanks!

$ make
Compiling merging-flux.cxx
merging-flux.cxx: In member function ‘virtual int MergingFlux::init(bool)’:
merging-flux.cxx:11:32: error: ‘class Mesh’ has no member named ‘coordinates’; did you mean ‘getCoordinates’?
Coordinates coord = mesh->coordinates();
^~~~~~~~~~~
getCoordinates
merging-flux.cxx:75:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian
’ in assignment
phiSolver = Laplacian::create(Options::getRoot()->getSection("phisolver"));
^
merging-flux.cxx:76:78: error: cannot convert ‘std::unique_ptr’ to ‘Laplacian*’ in assignment
psiSolver = Laplacian::create(Options::getRoot()->getSection("psisolver"));
^
merging-flux.cxx: In member function ‘virtual int MergingFlux::rhs(BoutReal)’:
merging-flux.cxx:90:20: warning: unused parameter ‘t’ [-Wunused-parameter]
int rhs(BoutReal t) {
^
../..//make.config:317: recipe for target 'merging-flux.o' failed
make: *** [merging-flux.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.