Skip to content

Commit

Permalink
Merge pull request #269 from airwarriorg91/master
Browse files Browse the repository at this point in the history
Addition of capability to do force calculation using 3D CV method
  • Loading branch information
rfj82982 committed Jun 17, 2024
2 parents 978594a + 701650f commit 4ea725e
Show file tree
Hide file tree
Showing 7 changed files with 834 additions and 292 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Jian Fang (STFC, UK)
Cedric Flageul (Poitiers, France)
Ricardo Frantz (Paris, France)
Athanasios Giannenas (ICL, UK)
Gaurav Gupta (IIST, India)
Arash Hamzehloo (ICL, UK)
Sylvain Laizet (ICL, UK)
Eric Lamballais (Poitiers, France)
Expand Down
144 changes: 144 additions & 0 deletions examples/Cylinder-wake/input_3Dforce.i3d
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
! -*- mode: f90 -*-

!===================
&BasicParam
!===================

! Flow type (1=Lock-exchange, 2=TGV, 3=Channel, 4=Periodic hill, 5=Cylinder, 6=dbg-schemes)
itype = 5

! Domain decomposition
p_row=0 ! Row partition
p_col=0 ! Column partition

! Mesh
nx=257 ! X-direction nodes
ny=128 ! Y-direction nodes
nz=32 ! Z-direction nodes
istret = 0 ! y mesh refinement (0:no, 1:center, 2:both sides, 3:bottom)
beta = 0.259065151 ! Refinement parameter (beta)

! Domain
xlx = 20. ! Lx (Size of the box in x-direction)
yly = 12. ! Ly (Size of the box in y-direction)
zlz = 6. ! Lz (Size of the box in z-direction)

! Boundary conditions
nclx1 = 2
nclxn = 2
ncly1 = 0
nclyn = 0
nclz1 = 0
nclzn = 0


! Flow parameters
iin = 1 ! Inflow conditions (1: classic, 2: turbinit)
re = 300. ! nu=1/re (Kinematic Viscosity)
u1 = 1. ! u1 (max velocity) (for inflow condition)
u2 = 1. ! u2 (min velocity) (for inflow condition)
init_noise = 0.125 ! Turbulence intensity (1=100%) !! Initial condition
inflow_noise = 0.0 ! Turbulence intensity (1=100%) !! Inflow condition

! Time stepping
dt = 0.0075 ! Time step
ifirst = 1 ! First iteration
ilast = 100 ! Last iteration

! Enable modelling tools
ilesmod=0 ! if 0 then DNS
iscalar=0 ! If iscalar=0 (no scalar), if iscalar=1 (scalar)
iibm=2 ! Flag for immersed boundary method

/End

!====================
&NumOptions
!====================

! Spatial derivatives
ifirstder = 4 ! (1->2nd central, 2->4th central, 3->4th compact, 4-> 6th compact)
isecondder = 5 ! (1->2nd central, 2->4th central, 3->4th compact, 4-> 6th compact, 5->hyperviscous 6th)
ipinter = 3 ! interpolation scheme (1: classic, 2: optimized, 3: optimized agressive)

! Time scheme
itimescheme = 3 ! Time integration scheme (1->Euler,2->AB2, 3->AB3, 4->AB4,5->RK3,6->RK4)

/End

!=================
&InOutParam
!=================

! Basic I/O
irestart = 0 ! Read initial flow field ?
icheckpoint = 10000 ! Frequency for writing backup file
ioutput = 100 ! Frequency for visualization
ilist = 25 ! Frequency for the output to screen
nvisu = 1 ! Size for visualisation collection

/End

!=================
&Statistics
!=================

nstat = 1 ! Size arrays for statistic collection
initstat = 10000 ! Time steps after which statistics are collected

/End

!########################
! OPTIONAL PARAMETERS
!#######################

!================
&ScalarParam
!================

numscalar = 0 ! How many scalars?
Sc = 0.2 ! Schmidt number

/End

!================
&LESModel
!================

jles = 0 ! LES Model (1: Phys Smag, 2: Phys WALE, 3: Phys dyn. Smag, 4: iSVV, 5: dyn SEV)
smagcst = 0.14 ! Smagorinsky constant
SmagWallDamp = 1 ! 1: Mason and Thomson Damping function, otherwise OFF
walecst = 0.5 ! WALES Model Coefficient
iconserv = 0 ! Formulation SGS divergence (0: non conservative, 1: conservative)

/End


!================
&ibmstuff
!================

cex=5. !when simulating a cylinder x coordinate of the center
cey=6. !when simulating a cylinder y coordinate of the center
cez=3. !when simulating a cylinder z coordinate of the center
ra=0.5 !when simulating a cylinder, radius
nraf=10 !level of refinement for iibm==2 to find the surface of the immersed object
nobjmax=2 !number of immersed objects (DO NOT USE ZERO OBJECTS)
iforces=1
nvol=1 !Number of volumes for computing force balance

/End

&ForceCVs
i2dsim = 0 ! select 1 for 2D CV Force Calculation and 0 for 3D CV Force Calculation
xld(1) = 4.0 !X left for volume control
xrd(1) = 6.0 !X right for volume control
yld(1) = 5.0 !Y bottom for volume control
yud(1) = 7.0 !Y top for volume control
zfr(1) = 5.0 !Z front for volume control
zbk(1) = 7.0 !Z back for volume control

/End

&CASE
/End
2 changes: 0 additions & 2 deletions examples/Cylinder-wake/input_DNS300_LR_MOVING.i3d
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ xld(1) = 3.0 !X left for volume control
xrd(1) = 7.0 !X right for volume control
yld(1) = 2.0 !Y bottom for volume control
yud(1) = 4.0 !Y top for volume control
!zld(1) = 0.01
!zrd(1) = 9.99

/End

Expand Down
2 changes: 0 additions & 2 deletions examples/Cylinder-wake/input_test_moving.i3d
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ xld(1) = 3.0 !X left for volume control
xrd(1) = 7.0 !X right for volume control
yld(1) = 2.0 !Y bottom for volume control
yud(1) = 4.0 !Y top for volume control
!zld(1) = 0.01
!zrd(1) = 9.99

/End

Expand Down
2 changes: 1 addition & 1 deletion src/case.f90
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ subroutine postprocess_case(rho,ux,uy,uz,pp,phi,ep)
endif

if (iforces.eq.1) then
call force(ux,uy,ep)
call force(ux,uy,uz,ep)
call restart_forces(1)
endif

Expand Down
Loading

0 comments on commit 4ea725e

Please sign in to comment.