Giter VIP home page Giter VIP logo

Comments (4)

Mateasek avatar Mateasek commented on August 20, 2024

I chaged the function header to
def fluxSurface(self, level = None, resolution = [1e-3, 1e-3], dim = "step", norm = True, closed = True, inlcfs = True, coord_type=None, grid=True, **coords):
as I dont understand clearly the meaning of psi_n parameter in other functions (mainly due to missing comments....) I used parameter norm to specify if the function is supposed to be working in normalized psi poloidal values.

from pleque.

kripnerl avatar kripnerl commented on August 20, 2024
  • I've added the review.
  • I'll test it as soon as I will be on computer with python instelled.
  • I understand your confusion with coordinates class, so I wll write comments ASAP (weekend?) for avoidance of future confusion. Hopefully with some stub of online documentation.
  • I still think that this header is too complicated and I would preffer to underscore this function, or rename it to somethink like selectFluxSurfaces and write function which will return only unique FluxSurface prefereably the one which goes throught midplane and has minimal value of r_mid.

from pleque.

kripnerl avatar kripnerl commented on August 20, 2024

Function coordinates(...) of instance of equilibrium class should be used for generation of coordinates from now on.
This function is factory function for Coordinate class (view #11)

from pleque.

Mateasek avatar Mateasek commented on August 20, 2024
  • flux_surface function name can be changed to whatever name you please
  • If a flux surface is a isosurface of psi poloidal, then the there are imo 3 types of surfaces
    1. Flux surface which is opened (set by paramerer closed to False) in the space covered by the equilibrium and is outside of the lcfs
    2. Flux surface which is closed(set by paramerer closed to True). Then there are two options:
      a) the surface is within the lcfs and then it is unique and encapsulates the magnetic axis (that is how it is identified by the function when you set the 'inlcfs' parameter to True).
      b) It is not inside the lcfs (inlcfs parameter set to False) and then there can be a number of isosurfaces with requested value of psi poloidal (inside and outside lcfs) and the function returns them all. This case happens when you include coils in the reconstruction space and should not be imo omitted. It can cause problems to other codes, which can for example use psi normalized to falsely identify what is inside the lcfs. This adds a nice tool how to find these problematic regions.

-If you want to have a function for each of these cases then be my guest, but they willl be most probably getting the results by calling flux_surface function, right? I don't personally like this option as it is piling up class functions (doing almost the same thing) and that is increasing the complexity of the class.

  • Flux surfaces can pass through midplane more than once, returning the one which has lower value of r_mid is ambiguous plus I don't think that covers all the user request possibilities.

from pleque.

Related Issues (20)

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.