Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
ffe1e71
Removing Bc-Jet.f90
Feb 14, 2023
9eb5571
added utils for ellipsoids - not functional yet
adfboyd Sep 15, 2023
69a9381
changing boundary conditions to be variable - x component done
adfboyd Sep 17, 2023
12dcff6
minor bug fix
adfboyd Sep 18, 2023
3964fa3
ellip_utils added
adfboyd Sep 18, 2023
8d3f2cd
adding y component
Sep 19, 2023
fc46de7
adding visualisation file epsilon support
adfboyd Sep 19, 2023
0c8f099
Merge branch 'bc_changes' of https://git.ecdf.ed.ac.uk/s2006749/Incom…
adfboyd Sep 19, 2023
e0cd6e3
traced through type change of lind everywhere
adfboyd Sep 19, 2023
01984a1
ellip_utils added
adfboyd Sep 18, 2023
5fba44f
adding visualisation file epsilon support
adfboyd Sep 19, 2023
e3217c0
Merge branch 'master' of https://git.ecdf.ed.ac.uk/s2006749/Incompact3d
adfboyd Sep 19, 2023
c7e2029
added in input file changes
adfboyd Sep 19, 2023
44344da
adding extra fields for rotational motion
adfboyd Sep 20, 2023
a561e93
added ellip case separate from cyl
adfboyd Sep 20, 2023
48219a6
added quaternion integration functions
adfboyd Sep 20, 2023
444a97d
adding linear solid time step
adfboyd Sep 21, 2023
86a5afd
rotational boundary conditions working! (I think)
adfboyd Sep 21, 2023
7dfb98b
started control volume changes
adfboyd Oct 4, 2023
b85a386
force calc
adfboyd Oct 4, 2023
abab88a
3d control vol
adfboyd Oct 5, 2023
1b3e698
finishing cvs
adfboyd Oct 8, 2023
d514482
added example input
adfboyd Oct 8, 2023
28e2227
forces tweaks
adfboyd Oct 9, 2023
706188c
corrected all vars to 3d version - still run problems
adfboyd Oct 10, 2023
4af930f
formatting
adfboyd Oct 11, 2023
b2b2d4b
added frame change util functions
adfboyd Oct 14, 2023
f1c45bf
checking all up to date
adfboyd Oct 19, 2023
ae30af1
fixed memory allocation bug
adfboyd Oct 20, 2023
94c4cad
fixed gridding issue
adfboyd Nov 14, 2023
ee13b75
rotating frame for control vols
adfboyd Dec 3, 2023
61237c1
tidying
adfboyd Dec 12, 2023
95e2b77
force simplification for debug
adfboyd Feb 20, 2024
966f9c6
adjustable gravity
adfboyd Feb 26, 2024
da7c1db
option to force z velocity to 0
adfboyd Feb 26, 2024
b1b33d1
force printout
adfboyd Feb 26, 2024
82c1948
force fixes/printing
Mar 10, 2024
9213c9a
added ability to fix body for force checks
Mar 21, 2024
3a0f195
fixed index error in y force calc
Mar 21, 2024
de2ed32
fixed body position when fixed
Mar 21, 2024
1955ed2
force outputting working
adfboyd Mar 22, 2024
31e2cc8
fixed force outputting twice
adfboyd Mar 23, 2024
28e10a8
removed debug prints
adfboyd Mar 23, 2024
5f555f6
changed do loops to correct values
adfboyd Mar 26, 2024
c6e611a
fixed volume loop
Mar 27, 2024
7833407
stopped variable name being used twice, simplified force calc even fu…
adfboyd Apr 1, 2024
5d4c926
fixed inputs to calculatePointVelocity
adfboyd Apr 3, 2024
6c31266
added cube_flag option
adfboyd Apr 15, 2024
10c21cb
detailed forces output
adfboyd Apr 17, 2024
3c9fc02
changed force normalisation
adfboyd Apr 17, 2024
331a5a7
added sign change to tconv2
adfboyd Apr 29, 2024
c6819d3
torque function fix
adfboyd May 21, 2024
61d5684
correct pressure and convective equations
adfboyd May 21, 2024
b114877
completed correct torque integrals for viscous terms
adfboyd May 21, 2024
40aa010
fixed derivative in volume integral and added integration to main pro…
adfboyd May 21, 2024
ab786a0
more options with torque inputs
adfboyd May 21, 2024
d48d8c3
fixed parameter input
adfboyd May 21, 2024
8bf279c
edits
May 22, 2024
064ff3b
fixed pressure in torque_calc
adfboyd Jun 5, 2024
8c28aad
fixed compile error from local
adfboyd Jun 12, 2024
1fe1d0e
fixed compile error
adfboyd Jun 12, 2024
df19d2e
fixed forces summing over vectors
adfboyd Jun 12, 2024
f6a19a6
Merge branch 'rotational_forces' of https://git.ecdf.ed.ac.uk/s200674…
adfboyd Jun 12, 2024
2fcba8f
fixed in torque_calc
adfboyd Jun 12, 2024
cadc6b9
added shear flow options in BC-Ellipsoid
Jun 17, 2024
8417d53
fixed final sign on torque calculation
Jun 17, 2024
167526e
generalised control volume scalar
adfboyd Jun 17, 2024
b0b4423
error check for nan
adfboyd Jun 17, 2024
cbbbc52
got rid of stretching param in geomcomplex_ellip
adfboyd Jun 17, 2024
05f36cd
slightly added debug comments
adfboyd Jun 17, 2024
b92628b
even more debug comments
adfboyd Jun 17, 2024
0d9fe7e
even more debug comments
adfboyd Jun 17, 2024
61f286b
final debug comments
adfboyd Jun 17, 2024
14c9c48
final final fix...
adfboyd Jun 17, 2024
da96541
changed location of debug
adfboyd Jun 18, 2024
8dc51e9
added failsafe for nan solutions
adfboyd Jun 18, 2024
ce4344e
debugging options for epsi fn
adfboyd Jun 23, 2024
b6f0c04
fixwed y ibm issue
adfboyd Jul 25, 2024
0013072
fixed sign in left box pressure calculation for torques
adfboyd Aug 8, 2024
6974fe7
found another bug in fprx/y summation. Added debug variable for torqu…
adfboyd Aug 8, 2024
aa32ea4
added torq_debug var to input reading
adfboyd Aug 8, 2024
f3a8c20
added debug csvs for torque calc
adfboyd Aug 9, 2024
5883f81
removed double scaling of pressure terms in debug output
adfboyd Aug 12, 2024
0ea0d71
Found bug in tpresxl(6), fixed
adfboyd Aug 12, 2024
e6479a8
added more debugging outputs for torque calculation
adfboyd Aug 13, 2024
c9db24e
flipped sign on torque calc
adfboyd Aug 13, 2024
ebfb75b
added option to flip torque sign
adfboyd Aug 14, 2024
300686e
added csv output of body position
adfboyd Aug 15, 2024
556e7a6
fixed signs in torque face 6 integrals. Changed switch to rotating frame
adfboyd Aug 20, 2024
592a041
fixed CalculatePointVelocity
adfboyd Sep 6, 2024
7e1f0db
fixed name of torque decomp files
adfboyd Sep 6, 2024
4a8db0f
fixed ibm points and angularVelocity handling
adfboyd Sep 9, 2024
e73e5e8
added option for only ztorq
Sep 15, 2024
bafdf49
vectorising all global body parameters to handle up to 10 bodies
adfboyd Oct 9, 2024
9c35d49
almost complete multi_body functionality - something strange going on…
adfboyd Oct 10, 2024
20edc24
fixed orientation issue
adfboyd Oct 11, 2024
3d44805
added inviscid option if Re<0.0001
Oct 13, 2024
5cd52b8
cleaned up startup outputs
adfboyd Oct 16, 2024
04ede5d
added output of forces (although zero) at first timestep. Won't outpu…
adfboyd Oct 16, 2024
7a86f25
zeroed force/torque outputs before calculations
adfboyd Oct 17, 2024
97fd522
removed itime2 torque writing
adfboyd Oct 17, 2024
845f90c
z components of restart files
adfboyd Oct 21, 2024
c6092b7
added debugging outputs to BC-ellipsoid
adfboyd Oct 22, 2024
6de9114
modified debug
adfboyd Oct 22, 2024
a5ce915
more debugging outputs
adfboyd Oct 22, 2024
3e07d50
fixed debug
adfboyd Oct 22, 2024
4e44842
more outputs
adfboyd Oct 22, 2024
c3c7dd8
narrowed down issue to ypraf
adfboyd Oct 22, 2024
f1df124
tidier outputs
adfboyd Oct 22, 2024
0b09803
tidierer inputs
adfboyd Oct 22, 2024
bf8e618
added buffer to ypraf
adfboyd Oct 23, 2024
13537d0
added buffer to nyraf
adfboyd Oct 23, 2024
233309b
added extra bit to deal with final part of ypraf in periodic case
adfboyd Oct 24, 2024
46e6e8f
removed write line
adfboyd Oct 24, 2024
c3e762a
fixed csv outputs
adfboyd Nov 4, 2024
950b128
added sample rate to body csvs
adfboyd Nov 4, 2024
87e85bd
Added extra debug flags
adfboyd Nov 15, 2024
3a1ce05
fixed integer overflow issue in io.f90
adfboyd Nov 15, 2024
fc5ea02
tidying comments
adfboyd Jan 17, 2025
92e62e3
Merge branch 'multiple_bodies' into X3d2025
adfboyd Jan 17, 2025
d443070
started testing after merge to current x3D
adfboyd Jan 17, 2025
258ba35
brought all changes up to more recent branch of X3D. Can't get tests …
adfboyd Mar 2, 2025
f03c16b
adding in divergence visualisation tool
Mar 2, 2025
2508be6
added div_visu output
adfboyd Mar 3, 2025
6845f72
closest to official branch without printing div_visu
adfboyd Mar 4, 2025
2469e68
added inviscid_output option to not output flow data
adfboyd Mar 4, 2025
854065f
fully added inviscid_output parameter
adfboyd Mar 4, 2025
ef5f990
added option for div_visu
adfboyd Mar 4, 2025
d971741
fixed test passes
adfboyd Mar 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vscode/settings.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file, it may conflict with other users' settings.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"fortran.fortls.disabled": true,
"makefile.configureOnOpen": false
}
139 changes: 139 additions & 0 deletions Makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file - Xcompact3d should be built with CMake now, and the Makefile was removed previously.

Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#=======================================================================
# Makefile for Xcompact3D
#=======================================================================
# Choose pre-processing options
# -DDOUBLE_PREC - use double-precision
# -DSAVE_SINGLE - Save 3D data in single-precision
# -DDEBG - debuggin xcompact3d.f90
# generate a Git version string
GIT_VERSION := $(shell git describe --tag --long --always)

DEFS = -DDOUBLE_PREC -DVERSION=\"$(GIT_VERSION)\"

LCL = local# local,lad,sdu,archer
IVER = 17# 15,16,17,18
CMP = gcc# intel,gcc
FFT = generic# generic,fftw3,mkl

BUILD ?=

#######CMP settings###########
ifeq ($(CMP),intel)
FC = mpiifort
#FFLAGS = -fpp -O3 -xHost -heap-arrays -shared-intel -mcmodel=large -safe-cray-ptr -g -traceback
FFLAGS = -fpp -O3 -xSSE4.2 -axAVX,CORE-AVX-I,CORE-AVX2 -ipo -fp-model fast=2 -mcmodel=large -safe-cray-ptr -I$(MPI_ROOT)/lib
##debuggin test: -check all -check bounds -chintel eck uninit -gen-interfaces -warn interfaces
else ifeq ($(CMP),gcc)
FC = mpif90
#FFLAGS = -O3 -funroll-loops -floop-optimize -g -Warray-bounds -fcray-pointer -x f95-cpp-input
ifeq ($(BUILD),debug)
FFLAGS = -cpp -g3 -Og -fexceptions -ftrapv
FFLAGS += -ffpe-trap=invalid,zero -fcheck=bounds -fimplicit-none
else
FFLAGS = -cpp -O3 -funroll-loops -floop-optimize -g
endif
FFLAGS += -Warray-bounds -fcray-pointer -fbacktrace -ffree-line-length-none
ifeq "$(shell expr `gfortran -dumpversion | cut -f1 -d.` \>= 10)" "1"
FFLAGS += -fallow-argument-mismatch
endif
else ifeq ($(CMP),nagfor)
FC = mpinagfor
FFLAGS = -fpp
else ifeq ($(CMP),cray)
FC = ftn
FFLAGS = -eF -g -O3 -N 1023
endif


MODDIR = ./mod
DECOMPDIR = ./decomp2d
SRCDIR = ./src
TURBDIR = ./src

### List of files for the main code
SRCDECOMP = $(DECOMPDIR)/decomp_2d.f90 $(DECOMPDIR)/glassman.f90 $(DECOMPDIR)/fft_$(FFT).f90 $(DECOMPDIR)/io.f90
OBJDECOMP = $(SRCDECOMP:%.f90=%.o)
SRC = $(SRCDIR)/module_param.f90 $(SRCDIR)/variables.f90 $(SRCDIR)/poisson.f90 $(SRCDIR)/derive.f90 $(SRCDIR)/implicit.f90 $(SRCDIR)/schemes.f90 $(SRCDIR)/parameters.f90 $(SRCDIR)/*.f90
OBJ = $(SRC:%.f90=%.o)
SRC = $(SRCDIR)/module_param.f90 $(SRCDIR)/variables.f90 $(SRCDIR)/BC-dbg-schemes.f90 $(SRCDIR)/poisson.f90 $(TURBDIR)/constants.f90 $(SRCDIR)/ellip_utils.f90 $(SRCDIR)/ibm.f90 $(SRCDIR)/derive.f90 $(SRCDIR)/implicit.f90 $(SRCDIR)/schemes.f90 $(SRCDIR)/forces.f90 $(SRCDIR)/probes.f90 $(SRCDIR)/navier.f90 $(SRCDIR)/tools.f90 $(SRCDIR)/visu.f90 $(SRCDIR)/BC-TBL.f90 $(SRCDIR)/BC-ABL.f90 $(SRCDIR)/les_models.f90 $(SRCDIR)/BC-Lock-exchange.f90 $(SRCDIR)/time_integrators.f90 $(SRCDIR)/filters.f90 $(SRCDIR)/parameters.f90 $(SRCDIR)/BC-User.f90 $(SRCDIR)/BC-TGV.f90 $(SRCDIR)/BC-Channel-flow.f90 $(SRCDIR)/BC-Periodic-hill.f90 $(SRCDIR)/BC-Cylinder.f90 $(SRCDIR)/BC-Ellipsoid.f90 $(SRCDIR)/BC-Mixing-layer.f90 $(SRCDIR)/BC-Sandbox.f90 $(SRCDIR)/BC-Uniform.f90 $(SRCDIR)/BC-Cavity.f90 $(TURBDIR)/acl_utils.f90 $(TURBDIR)/airfoils.f90 $(TURBDIR)/dynstall.f90 $(TURBDIR)/dynstall_legacy.f90 $(TURBDIR)/acl_elem.f90 $(TURBDIR)/acl_controller.f90 $(TURBDIR)/acl_turb.f90 $(TURBDIR)/acl_out.f90 $(TURBDIR)/acl_farm_controller.f90 $(TURBDIR)/acl_model.f90 $(TURBDIR)/acl_source.f90 $(TURBDIR)/adm.f90 $(TURBDIR)/turbine.f90 $(SRCDIR)/statistics.f90 $(SRCDIR)/case.f90 $(SRCDIR)/transeq.f90 $(SRCDIR)/genepsi3d.f90 $(SRCDIR)/xcompact3d.f90


#######FFT settings##########
ifeq ($(FFT),fftw3)
#FFTW3_PATH=/usr
#FFTW3_PATH=/usr/lib64
FFTW3_PATH=/usr/local/Cellar/fftw/3.3.7_1
INC:=-I$(FFTW3_PATH)/include
LIBFFT=-L$(FFTW3_PATH) -lfftw3 -lfftw3f
else ifeq ($(FFT),fftw3_f03)
FFTW3_PATH=/usr #ubuntu # apt install libfftw3-dev
#FFTW3_PATH=/usr/lib64 #fedora # dnf install fftw fftw-devel
#FFTW3_PATH=/usr/local/Cellar/fftw/3.3.7_1 #macOS # brew install fftw
INC:=-I$(FFTW3_PATH)/include
LIBFFT=-L$(FFTW3_PATH)/lib -lfftw3 -lfftw3f
else ifeq ($(FFT),generic)
INC:=
LIBFFT=
else ifeq ($(FFT),mkl)
SRCDECOMP := $(DECOMPDIR)/mkl_dfti.f90 $(SRCDECOMP)
LIBFFT=-Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread
INC=-I$(MKLROOT)/include
else ifeq ($(FFT),ffte)
INC:=
LIBFFT:=-L$(FFTE_DIR)/lib -lffte
endif

#######OPTIONS settings###########
OPT := -I$(SRCDIR) -I$(DECOMPDIR) $(FFLAGS)
LINKOPT := $(FFLAGS)

LIBIO :=
ADIOS2DIR :=
ifeq ($(IO),adios2)
ifeq ($(ADIOS2DIR),)
$(error Set ADIOS2DIR=/path/to/adios2/install/)
endif
OPT := -DADIOS2 $(OPT)
INC := $(INC) $(shell $(ADIOS2DIR)/bin/adios2-config --fortran-flags) #$(patsubst $(shell $(ADIOS2DIR)/bin/adios2-config --fortran-libs),,$(shell $(ADIOS2DIR)/bin/adios2-config -f))
LIBIO := $(shell $(ADIOS2DIR)/bin/adios2-config --fortran-libs)
endif

#-----------------------------------------------------------------------
# Normally no need to change anything below

all: xcompact3d

xcompact3d : $(OBJDECOMP) $(OBJ)
$(FC) -o $@ $(LINKOPT) $(OBJDECOMP) $(OBJ) $(LIBFFT) $(LIBIO)

$(OBJDECOMP):$(DECOMPDIR)%.o : $(DECOMPDIR)%.f90
$(FC) $(FFLAGS) $(OPT) $(DEFS) $(DEFS2) $(INC) -c $<
mv $(@F) ${DECOMPDIR}
#mv *.mod ${DECOMPDIR}


$(OBJ):$(SRCDIR)%.o : $(SRCDIR)%.f90
$(FC) $(FFLAGS) $(OPT) $(DEFS) $(DEFS2) $(INC) -c $<
mv $(@F) ${SRCDIR}
#mv *.mod ${SRCDIR}

## This %.o : %.f90 doesn't appear to be called...
%.o : %.f90
$(FC) $(FFLAGS) $(DEFS) $(DEFS2) $(INC) -c $<

.PHONY: post
post:
$(FC) $(FFLAGS) $(DEFS) $(DEFS2) post.f90 -c
$(FC) $(FFLAGS) -o $@ $(PSRC:.f90=.o)

.PHONY: clean


clean:
rm -f $(DECOMPDIR)/*.o $(DECOMPDIR)/*.mod $(DECOMPDIR)/*.smod
rm -f $(SRCDIR)/*.o $(SRCDIR)/*.mod $(SRCDIR)/*.smod
rm -f *.o *.mod *.smod xcompact3d

.PHONY: cleanall
cleanall: clean
rm -f *~ \#*\# out/* data/* stats/* planes/* *.xdmf *.log *.out nodefile core sauve*
Loading