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

Adding triangular mesh from EIRENE #30

Merged
merged 6 commits into from
Mar 20, 2024
Merged

Adding triangular mesh from EIRENE #30

merged 6 commits into from
Mar 20, 2024

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    72af5c5 View commit details
    Browse the repository at this point in the history
  2. EIRENE grid loading with fort files supported

    EIRENE grid can be loaded into edge_profiles.grid_ggd[1] now by
    providing the set of three fort files (fort.33, fort.34, fort.35)
    as keyword argument fort to solps2imas function.
    
    First the code reads for.33 to add any additional nodes to the space.
    The additional nodes all belong to grid extension outside the SOLPS
    grid.
    
    Then it reads fort.34 to add the triangular grid cells to the space and
    the extra edges involved with them.
    
    Then using fort.35, it conencts the triangular cells to their neighbours
    and uses ix, iy index to create subset with index -205 which stores
    EIRENE cells that overlap with B2.5 grid. Overlapping nodes and edges
    are also stored by taking intersections in grid_subset indices -201 and
    -202 respectively.
    
    Minor additional changes:
    
    * Moved convention of edge ordering from susbet_id.jl to solps2imas.jl
    * Added tol argument to search_points function to allow matching of
    nodes that are close to a given tolerance value. Default is 0, so by
    default it looks for exact numerical match. This is useful since EIRENE
    fort files keep node coordinates with 6 digits of precision only as
    compared to SOLPS output files (13 digits)
    anchal-physics committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    b390258 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a13054 View commit details
    Browse the repository at this point in the history
  4. Tests for tri mesh and using resize! 4 nodes edges

    Correct chosen_tri_edge_order has been identified from the sample
    EIRENE files.
    
    Added some verififcation tests for the EIRENE triangular mesh reading.
    Still need to check some mismatch in common faces between EIRENE and
    SOLPS in the PFR edge region.
    
    Also now only as many ndoes and edges are being initialized as required
    in the space. This gets rid of the extra initialization we have been
    doing so far.
    anchal-physics committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    94308e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7550f64 View commit details
    Browse the repository at this point in the history
  6. Ensuring ggd values refer to correct grid_subset

    When EIRENE grid is added, the b2.5 grid is moved to negative
    grid_subset_index. For example, all cells of b2.5 grid are now present
    in grid_susbset with index -5. Thus, any quantities that are defined on
    cells of b2.5 should refer ot -5 instead of 5.
    
    This is implemented by providing an additional argument to the val_obj
    function which is adictionary of grid_subset_index changes. If EIRENE
    grid is added, we populate this dictionary to show that 1 => -1, 2 => -2
    and 5 => -5. This way, the ggd values are correctly set.
    
    Now the comment and hotfix in https://github.com/ProjectTorreyPines/SynthDiag.jl/blob/806f1beffa8e72948b36c821ca2d628c8cb3174f/src/interferometer.jl#L68
    can be removed if we'll rely on this extended grid and not the one
    that is generated in SD4SOLPS.
    anchal-physics committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    35917eb View commit details
    Browse the repository at this point in the history