Skip to content

Commit

Permalink
function import
Browse files Browse the repository at this point in the history
  • Loading branch information
rmojgani committed Jul 3, 2023
1 parent 443019b commit 31316bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion py2d/Py2D_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from py2d.aposteriori_analysis import eddyTurnoverTime_2DFHIT
from py2d.SGSModel import *
# from py2d.uv2tau_CNN import *
from py2d.initialize import *

# Enable x64 Precision for Jax
jax.config.update('jax_enable_x64', True)
Expand Down Expand Up @@ -220,7 +221,7 @@ def Py2D_solver(Re, fkx, fky, alpha, beta, NX, SGSModel_string, eddyViscosityCoe
if readTrue:

# -------------- Initialization using pertubration --------------
w1_hat, psi_hat, psiPrevious_hat, psiCurrent_hat = initialize_random(NX, Kx, Ky):
w1_hat, psi_hat, psiPrevious_hat, psiCurrent_hat = initialize_perturbation(NX, Kx, Ky):
time = 0.0

else:
Expand Down
3 changes: 2 additions & 1 deletion py2d/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as nnp
import jax.numpy as np

def initialize_random(NX, Kx, Ky):
def initialize_perturbation(NX, Kx, Ky):
# -------------- Initialization using pertubration --------------
kp = 10.0
A = 4*np.power(kp,(-5))/(3*np.pi)
Expand All @@ -28,3 +28,4 @@ def initialize_random(NX, Kx, Ky):


#def initialize_resume(NX, Kx, Ky):

0 comments on commit 31316bf

Please sign in to comment.