Skip to main content

hydrogym.nek.nek_lib.nek_utils

Collection of NEK5000 usage

NEK_INIT Objects

class NEK_INIT()

__init__

def __init__(nek: nek, drl: drl, rank_folder)

A class for initialization of NEK Dependencies nek:[dataclass]Simulation config drl:[dataclass]DRL config rank_folder:[str]target folders to run drl

get_Case_Files

def get_Case_Files()

Get required case files for running simulation IF it is complusory, it will be rewritten no matter if the file exists IF it is optional, it will NOT be covered if it Exist.

write_SESSION_NAME

def write_SESSION_NAME()

Write the session name and where the code should be executed

rewrite_REA_v17

def rewrite_REA_v17()

Re-Write parameter files for NEK version <= 17. For the controllable params, please see config.

rewrite_REA_v19

def rewrite_REA_v19()

Write parameter files for NEK version >= 19

init_restart

def init_restart()

Copy the restart file to the target folder only if RSTART NOT EXIST

write_timeSeries

def write_timeSeries()

Write the int_pos file for the case file