-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from PCoulomPoMtl/main
Integration of proper bubble interactions structure
- Loading branch information
Showing
46 changed files
with
4,200 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
BUBBLE | ||
RPModel KM | ||
Emissions IC 250.0e-6 | ||
Emissions IC 300.0e-6 | ||
PressureAmbient 1.0e5 | ||
END | ||
|
||
|
This file contains 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
This file contains 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,41 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
project (cavitationonset_apecss) | ||
set(CMAKE_C_COMPILER /usr/bin/gcc) | ||
|
||
include_directories($ENV{APECSS_DIR}/include) | ||
FILE (GLOB_RECURSE myfiles ABSOLUTE ../src/*.c) | ||
|
||
set (mylibs m apecss) | ||
link_directories($ENV{USRLIB_DIR} $ENV{APECSS_DIR}/lib) | ||
|
||
foreach(arg ${myincludes}) | ||
IF (arg MATCHES "-I") | ||
STRING(REGEX REPLACE "-I" "" myinc ${arg}) | ||
message("Additional include: ${myinc}") | ||
include_directories(${myinc}) | ||
ENDIF(arg MATCHES "-I") | ||
endforeach(arg ${myincludes}) | ||
|
||
foreach(arg ${mylibs}) | ||
STRING(REGEX REPLACE "lib" "" myl1 ${arg}) | ||
STRING(REGEX REPLACE ".a$" "" myl2 ${myl1}) | ||
set(mylibs ${myl2} ${mylibs} ${myl2}) | ||
endforeach(arg ${mylibs}) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
message(STATUS "Optimization: No optimization specified.") | ||
set(CMAKE_BUILD_TYPE Release) | ||
endif() | ||
|
||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
message(STATUS "Optimization: Debug") | ||
set(CMAKE_C_FLAGS_DEBUG "-Wall -g") | ||
elseif(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
message(STATUS "Optimization: Release") | ||
add_definitions(-DNDEBUG) | ||
set(CMAKE_C_FLAGS_RELEASE "-Wall -Werror -O3") | ||
endif() | ||
|
||
add_executable(cavitationonset_apecss ${myfiles}) | ||
target_link_libraries(cavitationonset_apecss ${mylibs}) |
This file contains 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,5 @@ | ||
#!/bin/bash | ||
rm cavitationonset_apecss | ||
cmake CMakeLists.txt -DCMAKE_BUILD_TYPE=Release | ||
make | ||
rm -r CMakeCache.txt CMakeFiles Makefile cmake_install.cmake |
This file contains 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,24 @@ | ||
import os | ||
|
||
# File designed to recover data for plotting results in cavitation onset case | ||
|
||
file = open("Ida2009_results.txt", "r") | ||
lines = file.readlines() | ||
file.close() | ||
|
||
count = int(lines[0].split(" ")[0]) | ||
png = float(lines[0].split(" ")[5]) | ||
cl_size = float(lines[0].split(" ")[7]) | ||
|
||
file_name = "{}_{:.4E}_{:.2f}.txt".format(count, png, cl_size) | ||
|
||
working_path = os.getcwd() | ||
results_path = os.path.join(working_path, "results") | ||
if not os.path.exists(results_path) : | ||
os.makedirs(results_path) | ||
file_results = open(os.path.join(results_path, file_name), "w") | ||
|
||
for line in lines : | ||
file_results.write(line) | ||
|
||
file_results.close() |
This file contains 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,36 @@ | ||
######################################################### | ||
# # | ||
# APECSS Options File # | ||
# # | ||
######################################################### | ||
|
||
BUBBLE | ||
RPModel KM | ||
Emissions IC 900.0e-06 | ||
PressureAmbient 0.1013e6 | ||
END | ||
|
||
GAS | ||
EoS IG | ||
ReferenceDensity 1.2 | ||
PolytropicExponent 1 | ||
END | ||
|
||
LIQUID | ||
ReferencePressure 0.1013e6 | ||
ReferenceDensity 1000.0 | ||
ReferenceSoundSpeed 1500.0 | ||
Viscosity 1.002e-3 | ||
END | ||
|
||
INTERFACE | ||
SurfaceTensionCoeff 0.0728 | ||
END | ||
|
||
RESULTS | ||
Bubble | ||
END | ||
|
||
ODESOLVER | ||
tolerance 1.0e-10 | ||
END |
Oops, something went wrong.