Process geometry for CFD simulation - remove internal faces between adjacent buildings.
-
support for all
LoDlevels incityjson(lod 1.2, lod 1.3, lod 2.2). -
support
multithreadingprocess (for one adjacent block). -
support exporting as
.jsonfile or.offfile. -
visualisation:
-
validate the result file via:
Compile and build it, run the command ./geocfd --help to print the usage information:
usage: geocfd --dataset=string --adjacency=string --path_result=string [options] ...
options:
-d, --dataset dataset (.json) (string)
-a, --adjacency adjacency file (.txt) (string)
-p, --path_result where the results will be saved (string)
-l, --lod lod level (double [=2.2])
-m, --minkowski minkowski value (double [=0.01])
-e, --target edge length target edge length for remeshing (double [=3])
--remesh activate remeshing processing (warning: time consuming)
--multi activate multi threading process
--json output as .json file format
--off output as .off file format
--all adjacency file contains all adjacent blocks
--help print this messageNote
-
for all adjacency mode, multi threading should not be enabled (if enabled from the console, it will be switched off).
The reason is multi threading didn't work as desired when reading all adjacencies.
-
for all adjacency mode, flag
--allmust be provided.
./geocfd -d 3dbag_v210908_fd2cee53_5907.json -a adjacency5.txt -p D:\SP\geoCFD\data --multi --offdataset: dataset
adjacency file: adjacency5.txt
./geocfd -d dataset.json -a adjacencies.txt -p D:\geoCFD\data --all --offdataset: dataset
adjacencies file: adjacencies.txt
-
if the program does not exit, you may need to re-open your console again and re-run it. (for example, dataset_2).
This may be due to the complex geometry of the buildings in
dataset_2, one of the buildings contain holes. -
the
minkowski paramis set to0.01by default.The param can be altered, but proceed with caution, too small minkowski param may not fill the holes of the building in
dataset_2.
CGAL - The version should be above 5.0 since we can use the header-only, which means we don't have to manually compile CGAL.
install CGAL via vcpkg:
check this ->
C++ Standard: C++ 11
Compiler: MSVC
Generator: Ninja
Commands:
"..\MICROSOFTVISUALSTUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"
-G "Ninja"
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo"
-DCMAKE_INSTALL_PREFIX:PATH="..\geoCFD\out\install\x64-Release"
-DCMAKE_C_COMPILER:FILEPATH="../MicrosoftVisualStudio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
-DCMAKE_CXX_COMPILER:FILEPATH="../MicrosoftVisualStudio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe"
-DCMAKE_MAKE_PROGRAM="..\MICROSOFTVISUALSTUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe"
-DCMAKE_TOOLCHAIN_FILE="../dev/vcpkg/scripts/buildsystems/vcpkg.cmake" The commands are the information of compiler and generator(for example, the file path of cl.exe and ninja.exe), which should
be generated by your IDE automatically.
If you use other platforms (such as Linux or MacOS), you can refer to CMakeLists.txt file and use it to build a CMake project using src, include and data folder.
- if the
input adjacency filecontains multiple adjacent blocks, be sure to add--allflag, otherwise geoCFD may exit with unkown errors. - currently
multi threadingdoesn't work with the input of multiple adjacent blocks, thus even the flag--multiis specified, geoCFD will not enable multi threading process. - there is one possibility that
minkowski sumwill be in executing status for unkown time, if so restart geoCFD. remeshingis sort ofbetaversion, it should be warned thatremeshingwill be time-consuming, thus it is not recommended to activate.- it may take time for multiple adjacent blocks.
- all adjacencies file need to meet some specific "format", see here for an example (please be aware that if you download the .txt file you will find it contains 19 lines but in GitHub it only shows 18 lines).