Commit e0a1742a authored by Alex 's avatar Alex
Browse files

added test case

parent 5ccd99f7
*.RST*
*.o*
*.xyz*
*plt*
*.f
*.nam
*.OUT
*.rst
d*.dat
*.x3dunf
*Distribution.dat
flowfieldMPI
*.res
File added
File added
#########################################################################################################
### Input file for the box-mesh tool
###
###
###################################### Number of points #################################################
### Number of points (ncell+1) in the i-direction. Should be a multiple of 32 + 1
ni 65
### Number of points (ncell+1) in the j-direction (vertical direction)
nj 65
### Number of points (ncell+1) in the k-direction (flow direction)
nk 129
######################################### Domain Length #################################################
### Domain length x-direction (horizontal cross-stream direction) [m]
xlen 756
### Domain length y-direction (vertical direction) [m]
ylen 756
### Domain length z-direction (flow direction) [m]
zlen 1512
######################################### Boundary condition #################################################
### Boundary condition codes:
### 1: internal field
### 101-200: Wall boundary condition (no slip)
### 201-300: Inlet boundary condition
### 301-400: Farfield boundary condition
### 401-500: Outlet boundary condition
### 501: Cyclic boundary condition
### 601: Symmetry boundary condition
###
set-bc 601 601 601 601 201 401
#----------------------------
# mann.py
#----------------------------
# Short script using the pymann2fparser tool
# to generate a mann turbulence box.
#----------------------------
from pymann.main import pymann
import numpy as np
# reference lenght scale, equal to NREL5MW radius
R = 63
#----Mann turbulence box inputs----
# n: number of cells in (flow | cross-flow | vertical) directions
n = np.array([1024, 64, 64])
# box side lengths (outer boundaries)
Lbox = np.array([160*R, 10*R, 10*R])
# U: mean wind speed [m/s], which determines the total time interval for which the turbulence
# exists ie. T = box_length/U.
U = 8.
# parameters should lead to TI of about 4.5%
pym = pymann(ae=0.02,l=40,Lbox=Lbox, n=n, U=U)
# generate turbulence
pym.update_turb()
File added
File added
File added
#!/bin/sh
#PBS -N grid
#PBS -r n
##PBS -q xpresq
#PBS -q windq
##PBS -q workq
##PBS -l nodes=12:ppn=20
#PBS -l nodes=1:ppn=20
##PBS -l walltime=14400
#PBS -l walltime=00:10:00
#PBS -W x=NACCESSPOLICY:SINGLEJOB
#PBS -j oe
NPROCS=`wc -l < $PBS_NODEFILE`
NPROCS=8
echo $NPROCS
#/scratch stuff
cd $PBS_O_WORKDIR
SCRATCHDIR=/scratch/$USER/$PBS_JOBID
### Copy files to the scratch disk of the compute node:
for node in `cat $PBS_NODEFILE | sort -u`
do
echo $node
ssh $node cp -p $HOME/tools/nuf $SCRATCHDIR
ssh $node cp -p $PBS_O_WORKDIR/flowfieldMPI $SCRATCHDIR
ssh $node cp -p $PBS_O_WORKDIR/os.database $SCRATCHDIR 2>/dev/null
done
cp -p ./input.dat $SCRATCHDIR
cp -p ./*.dat $SCRATCHDIR
cp -p ./grid.X?D $SCRATCHDIR
cp -p ./grid-e??.X?D $SCRATCHDIR
cp -p ./grid.T?D $SCRATCHDIR
cp -p ./*.geo $SCRATCHDIR
cp -p ./*.pc $SCRATCHDIR
cp -p ./*.NRL $SCRATCHDIR
cp -p ./*.fp $SCRATCHDIR
#cp -p NTK* $SCRATCHDIR
cp -p $HOME/svn/EllipSys3D/work/UniTTe/NordtankT/Turbulence/run6/uvwfluct* $SCRATCHDIR
#cp -p /home/niet/TurbineData/NREL5MW.dat $SCRATCHDIR
#cp -p /home/niet/TurbineData/flex_pc.NRL $SCRATCHDIR
#cp -p ./grid.X?D $SCRATCHDIR
#cp -p ./grid-e??.X?D $SCRATCHDIR
#cp -p ./grid.T?D $SCRATCHDIR
cp ./grid.rst $SCRATCHDIR 2>/dev/null
cp ./grid.force $SCRATCHDIR 2>/dev/null
### Change working directory to scratch disk
### and do the calculation:
cd $SCRATCHDIR
mpirun -np $NPROCS ./flowfieldMPI
#####mpirun -np $NPROCS ./flowfieldMPI
#/opt/openmpi/1.2.6_intel_ib/bin/mpirun -np $NPROCS ./flowfieldMPI
## Execute pbsnodes command to get information about down nodes
### Move the output to the user's directory - the scratch
### disk will be cleaned when
mv *.o* $PBS_O_WORKDIR
mv *.res $PBS_O_WORKDIR
mv *.?pr* $PBS_O_WORKDIR
mv *.?P?* $PBS_O_WORKDIR
mv *.?F?* $PBS_O_WORKDIR
mv *.?H?* $PBS_O_WORKDIR
mv *.OUT $PBS_O_WORKDIR
mv *.?force $PBS_O_WORKDIR
mv *.force $PBS_O_WORKDIR
mv *.*points $PBS_O_WORKDIR
mv *.plt $PBS_O_WORKDIR
mv *.RST* $PBS_O_WORKDIR
mv *.PLT* $PBS_O_WORKDIR
mv *.xyz* $PBS_O_WORKDIR
mv *.f $PBS_O_WORKDIR
mv grid.AS* $PBS_O_WORKDIR
mv *.Tp* $PBS_O_WORKDIR
mv *.Fp* $PBS_O_WORKDIR
mv *CT* $PBS_O_WORKDIR
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
../grid/grid.T3D
\ No newline at end of file
../grid/grid.X3D
\ No newline at end of file
This diff is collapsed.
# --------------------------------------------------------------------
# DATE 03-10-20
# AUTHOR ALRF
# --------------------------------------------------------------------
# project name
# --------------------------------------------------------------------
project grid
# --------------------------------------------------------------------
# solver parameters
# --------------------------------------------------------------------
# gridlevel to start on
grid_level 2
# number of outer iterations
mstep 50 100
# number of inner iterations
mstepp 6
# number of subiterations (only if transient)
subiterations 4 4
# convergens criterium
reslim 1.d-5 1.d-6 1.d-4
# convergens criterium for pressure correction
reslimp 1.d-2
# difference scheme
diff_scheme quick_cds4_mask quick uds uds
# pressure correction method
pres_corr simplea 1.0 0.95
# pres_corr simple
interpolationorder 2
# Cartesian Metrics
# cartesianmetrics true
# --------------------------------------------------------------------
# run parameters
# --------------------------------------------------------------------
# start from scratch
# restart true
# steady state calculation
transient true 0.9844
# number of iterations between writing out graph file
nrgraphout 100000
# number of iterations between writing out restart file
nrrestart 100000
# nrrestart 500
# write output
output true
# outextensions true
#
#extract-point 378 378 100
extract-line 378 378 0 378 378 1512 13
extract-line 315 378 0 315 378 1512 13
#extract-line 441 378 0 441 378 1512 121
#extract-line 378 315 0 378 315 1512 121
#extract-line 378 441 0 378 441 1512 121
#
#
average 100000
# runtimeplot 3000 25500
# averageplot 3000 8000
# --------------------------------------------------------------------
# relaxation parameters
# --------------------------------------------------------------------
# relaxu .7d0
# relaxp .12d0 1.d0
relaxu .8d0
relaxp 1.d0
# --------------------------------------------------------------------
# fluid parameters
# --------------------------------------------------------------------
density 1.225d0
viscosity 1.789d-5
# --------------------------------------------------------------------
# inlet values
# --------------------------------------------------------------------
uinlet 0.d0
vinlet 0.d0
winlet 8.d0
# --------------------------------------------------------------------
# farfield values
# --------------------------------------------------------------------
ufarfield 0.d0
vfarfield 0.d0
wfarfield 8.00001d0
# --------------------------------------------------------------------
# fparser Inflow
# --------------------------------------------------------------------
#func-const U0 8.0
## inlet specification
#inlet w 201 300 value U0
#inlet v 201 300 value 0.d0
#inlet u 201 300 value 0.d0
# Mann turbulence
#inlet w 201 300 filesum w.fp
#inlet u 201 300 file u.fp
#inlet v 201 300 file v.fp
# --------------------------------------------------------------------
# WindTurb
# --------------------------------------------------------------------
windturb
# set the rotational centre of the turbulence field (in this case centre of u.fp etc)
rotcentre_wtu 315 315 0
# position rotcentre_wtu with respect to the domain
pos_wtu 378 378 126 -63
dir_wtu 0.0 0.0 1.0
scale_wtu 1.1 0.9 0.95
tstart_wtu 2.0
tshift_wtu 11.0
smear_wtu 23.6250 # twice the grid size
fparser_wtu u.fp v.fp w.fp
# --------------------------------------------------------------------
# k-omega model
# --------------------------------------------------------------------
# turbulent calculation
turbulence komega
ko_version sst
turbcrossterms false
des_model true
# relaxation for turbulence equations
relaxturb 6.0d-1
# inlet parameters
te_inlet 1.d-2
omega_inlet 1.d6
# farfield parameters
te_farfield 1.d-2
omega_farfield 1.d6
../mann_turb/u.fp
\ No newline at end of file
../mann_turb/v.fp
\ No newline at end of file
../mann_turb/w.fp
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment