-
Notifications
You must be signed in to change notification settings - Fork 142
X3D with 6DOF immersed solids #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
adfboyd
wants to merge
129
commits into
xcompact3d:master
Choose a base branch
from
adfboyd:X3d2025_nodivvisu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
ffe1e71
Removing Bc-Jet.f90
9eb5571
added utils for ellipsoids - not functional yet
adfboyd 69a9381
changing boundary conditions to be variable - x component done
adfboyd 12dcff6
minor bug fix
adfboyd 3964fa3
ellip_utils added
adfboyd 8d3f2cd
adding y component
fc46de7
adding visualisation file epsilon support
adfboyd 0c8f099
Merge branch 'bc_changes' of https://git.ecdf.ed.ac.uk/s2006749/Incom…
adfboyd e0cd6e3
traced through type change of lind everywhere
adfboyd 01984a1
ellip_utils added
adfboyd 5fba44f
adding visualisation file epsilon support
adfboyd e3217c0
Merge branch 'master' of https://git.ecdf.ed.ac.uk/s2006749/Incompact3d
adfboyd c7e2029
added in input file changes
adfboyd 44344da
adding extra fields for rotational motion
adfboyd a561e93
added ellip case separate from cyl
adfboyd 48219a6
added quaternion integration functions
adfboyd 444a97d
adding linear solid time step
adfboyd 86a5afd
rotational boundary conditions working! (I think)
adfboyd 7dfb98b
started control volume changes
adfboyd b85a386
force calc
adfboyd abab88a
3d control vol
adfboyd 1b3e698
finishing cvs
adfboyd d514482
added example input
adfboyd 28e2227
forces tweaks
adfboyd 706188c
corrected all vars to 3d version - still run problems
adfboyd 4af930f
formatting
adfboyd b2b2d4b
added frame change util functions
adfboyd f1c45bf
checking all up to date
adfboyd ae30af1
fixed memory allocation bug
adfboyd 94c4cad
fixed gridding issue
adfboyd ee13b75
rotating frame for control vols
adfboyd 61237c1
tidying
adfboyd 95e2b77
force simplification for debug
adfboyd 966f9c6
adjustable gravity
adfboyd da7c1db
option to force z velocity to 0
adfboyd b1b33d1
force printout
adfboyd 82c1948
force fixes/printing
9213c9a
added ability to fix body for force checks
3a0f195
fixed index error in y force calc
de2ed32
fixed body position when fixed
1955ed2
force outputting working
adfboyd 31e2cc8
fixed force outputting twice
adfboyd 28e10a8
removed debug prints
adfboyd 5f555f6
changed do loops to correct values
adfboyd c6e611a
fixed volume loop
7833407
stopped variable name being used twice, simplified force calc even fu…
adfboyd 5d4c926
fixed inputs to calculatePointVelocity
adfboyd 6c31266
added cube_flag option
adfboyd 10c21cb
detailed forces output
adfboyd 3c9fc02
changed force normalisation
adfboyd 331a5a7
added sign change to tconv2
adfboyd c6819d3
torque function fix
adfboyd 61d5684
correct pressure and convective equations
adfboyd b114877
completed correct torque integrals for viscous terms
adfboyd 40aa010
fixed derivative in volume integral and added integration to main pro…
adfboyd ab786a0
more options with torque inputs
adfboyd d48d8c3
fixed parameter input
adfboyd 8bf279c
edits
064ff3b
fixed pressure in torque_calc
adfboyd 8c28aad
fixed compile error from local
adfboyd 1fe1d0e
fixed compile error
adfboyd df19d2e
fixed forces summing over vectors
adfboyd f6a19a6
Merge branch 'rotational_forces' of https://git.ecdf.ed.ac.uk/s200674…
adfboyd 2fcba8f
fixed in torque_calc
adfboyd cadc6b9
added shear flow options in BC-Ellipsoid
8417d53
fixed final sign on torque calculation
167526e
generalised control volume scalar
adfboyd b0b4423
error check for nan
adfboyd cbbbc52
got rid of stretching param in geomcomplex_ellip
adfboyd 05f36cd
slightly added debug comments
adfboyd b92628b
even more debug comments
adfboyd 0d9fe7e
even more debug comments
adfboyd 61f286b
final debug comments
adfboyd 14c9c48
final final fix...
adfboyd da96541
changed location of debug
adfboyd 8dc51e9
added failsafe for nan solutions
adfboyd ce4344e
debugging options for epsi fn
adfboyd b6f0c04
fixwed y ibm issue
adfboyd 0013072
fixed sign in left box pressure calculation for torques
adfboyd 6974fe7
found another bug in fprx/y summation. Added debug variable for torqu…
adfboyd aa32ea4
added torq_debug var to input reading
adfboyd f3a8c20
added debug csvs for torque calc
adfboyd 5883f81
removed double scaling of pressure terms in debug output
adfboyd 0ea0d71
Found bug in tpresxl(6), fixed
adfboyd e6479a8
added more debugging outputs for torque calculation
adfboyd c9db24e
flipped sign on torque calc
adfboyd ebfb75b
added option to flip torque sign
adfboyd 300686e
added csv output of body position
adfboyd 556e7a6
fixed signs in torque face 6 integrals. Changed switch to rotating frame
adfboyd 592a041
fixed CalculatePointVelocity
adfboyd 7e1f0db
fixed name of torque decomp files
adfboyd 4a8db0f
fixed ibm points and angularVelocity handling
adfboyd e73e5e8
added option for only ztorq
bafdf49
vectorising all global body parameters to handle up to 10 bodies
adfboyd 9c35d49
almost complete multi_body functionality - something strange going on…
adfboyd 20edc24
fixed orientation issue
adfboyd 3d44805
added inviscid option if Re<0.0001
5cd52b8
cleaned up startup outputs
adfboyd 04ede5d
added output of forces (although zero) at first timestep. Won't outpu…
adfboyd 7a86f25
zeroed force/torque outputs before calculations
adfboyd 97fd522
removed itime2 torque writing
adfboyd 845f90c
z components of restart files
adfboyd c6092b7
added debugging outputs to BC-ellipsoid
adfboyd 6de9114
modified debug
adfboyd a5ce915
more debugging outputs
adfboyd 3e07d50
fixed debug
adfboyd 4e44842
more outputs
adfboyd c3c7dd8
narrowed down issue to ypraf
adfboyd f1df124
tidier outputs
adfboyd 0b09803
tidierer inputs
adfboyd bf8e618
added buffer to ypraf
adfboyd 13537d0
added buffer to nyraf
adfboyd 233309b
added extra bit to deal with final part of ypraf in periodic case
adfboyd 46e6e8f
removed write line
adfboyd c3e762a
fixed csv outputs
adfboyd 950b128
added sample rate to body csvs
adfboyd 87e85bd
Added extra debug flags
adfboyd 3a1ce05
fixed integer overflow issue in io.f90
adfboyd fc5ea02
tidying comments
adfboyd 92e62e3
Merge branch 'multiple_bodies' into X3d2025
adfboyd d443070
started testing after merge to current x3D
adfboyd 258ba35
brought all changes up to more recent branch of X3D. Can't get tests …
adfboyd f03c16b
adding in divergence visualisation tool
2508be6
added div_visu output
adfboyd 6845f72
closest to official branch without printing div_visu
adfboyd 2469e68
added inviscid_output option to not output flow data
adfboyd 854065f
fully added inviscid_output parameter
adfboyd ef5f990
added option for div_visu
adfboyd d971741
fixed test passes
adfboyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "fortran.fortls.disabled": true, | ||
| "makefile.configureOnOpen": false | ||
| } |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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* |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.