CFD-GO / TCLB

TCLB - Templated MPI+CUDA/CPU Lattice Boltzmann code
https://tclb.io
GNU General Public License v3.0
178 stars 70 forks source link

which model should i compiled to run the "d2q9_SRT_example.xml" #333

Closed ztdepztdep closed 3 years ago

ztdepztdep commented 3 years ago

hello, I didn't find the d2q9_SRT model in the "CLB"' directory. I want to know which model should I compile to run this example file.

llaniewski commented 3 years ago

You have to compile the model you want to use. For instance, if you want to use d2q9_SRT you use:

make -j 4 d2q9_SRT

The -j 4 option makes the compilation in parallel.

ztdepztdep commented 3 years ago

The problem is d2q9_SRT directory is missing in the CLB directly. I didn't find it.

(base) ztdep@linux-9owh:~/Downloads/TCLB/CLB> ls
advection_diffusion2D         auto_BGK_FMT_HiOrd      auto_d3q19_BGK_HiOrd      auto_d3q19_part_autosym  auto_d3q19_TRT_autosym   auto_FMT            auto_part_BGK          auto_part_HiOrd          auto_part_WMRT_autosym  auto_TRT_FMT_HiOrd     auto_WMRT_HiOrd  d2q9_npe_guo           wave2D
advection_diffusion2D_fields  auto_BGK_HiOrd          auto_d3q19_FMT            auto_d3q19_part_BGK      auto_d3q19_TRT_FMT       auto_FMT_autosym    auto_part_BGK_autosym  auto_part_HiOrd_autosym  auto_part_WMRT_FMT      auto_TRT_HiOrd         config.h         d2q9_poison_boltzmann
auto_autosym                  auto_d3q19              auto_d3q19_FMT_autosym    auto_d3q19_part_FMT      auto_d3q19_TRT_HiOrd     auto_FMT_HiOrd      auto_part_BGK_FMT      auto_part_TRT            auto_part_WMRT_HiOrd    auto_WMRT              config.mk        d3q19_heat_adj_art
auto_BGK                      auto_d3q19_autosym      auto_d3q19_FMT_HiOrd      auto_d3q19_part_HiOrd    auto_d3q19_WMRT          auto_HiOrd          auto_part_BGK_HiOrd    auto_part_TRT_autosym    auto_TRT                auto_WMRT_autosym      d2q9             d3q19_heat_adj_prop
auto_BGK_autosym              auto_d3q19_BGK          auto_d3q19_HiOrd          auto_d3q19_part_TRT      auto_d3q19_WMRT_autosym  auto_HiOrd_autosym  auto_part_FMT          auto_part_TRT_FMT        auto_TRT_autosym        auto_WMRT_FMT          d2q9_diff        d3q27
auto_BGK_FMT                  auto_d3q19_BGK_autosym  auto_d3q19_HiOrd_autosym  auto_d3q19_part_WMRT     auto_d3q19_WMRT_FMT      auto_part           auto_part_FMT_autosym  auto_part_TRT_HiOrd      auto_TRT_FMT            auto_WMRT_FMT_autosym  d2q9_hb          d3q27_csf
auto_BGK_FMT_autosym          auto_d3q19_BGK_FMT      auto_d3q19_part           auto_d3q19_TRT           auto_d3q19_WMRT_HiOrd    auto_part_autosym   auto_part_FMT_HiOrd    auto_part_WMRT           auto_TRT_FMT_autosym    auto_WMRT_FMT_HiOrd    d2q9_inc         diffusion2D
llaniewski commented 3 years ago

It looks like you tried to compile all models. This will probably fail.

Compile only the needed model with make -j 4 d2q9_SRT. Then you will end up with the CLB/d2q9_SRT/main solver.

ztdepztdep commented 3 years ago

It works now .thanks. Does TCLB provide restart compatibility or do we have some method to decide the convergence of the computation process.

llaniewski commented 3 years ago

You can save and load the simulation with the <SaveMemoryDump/> and <LoadMemoryDump/> elements.

You can use <Stop/> element for checking convergence. For example

<Stop FluxChange="1e-5" Times="5" Iterations="100"/>

will check the Flux global integral every 100 iterations, and if 5 times in a row it will be changing less then 1e-5, then it will stop the simulation.

ztdepztdep commented 3 years ago

The d2q9 karmal example gives many warnings?

[ 0] WARNING: Unknown setting Smag [ 0] WARNING: Unknown setting PressDiffInObj [ 0] WARNING: Unknown setting EOSScale [ 0] WARNING: Unknown setting Tension [ 0] WARNING: Unknown setting Coriolis [ 0] WARNING: Unknown setting SolidAlfa [ 0] WARNING: Unknown setting FluidAlfa [ 0] WARNING: Unknown setting InitTemperature [ 0] WARNING: Unknown setting InletTemperature

MPMD: TCLB: local:0/1 work:0/1 --- connected to: [ ] ------------------------------------------------------------------------- [ ] - CLB version: v6.5.0-20-gaa97a05 - [ ] - Model: d2q9 - [ ] ------------------------------------------------------------------------- [ ] Setting output path to: karman [ 0] Selecting device 0/1 [ 0] WARNING: No "Units" element in config file [ ] Mesh size in config file: 1024x100x1 [ ] Global lattice size: 1024x100x1 [ ] Max region size: 102400. Mesh size 102400. Overhead: 0% [ ] Local lattice size: 1024x100x1 Hello allocator! [ ] Threads | Action [ ] 32x16 | Primal , NoGlobals , BaseIteration [ ] 32x16 | Tangent , NoGlobals , BaseIteration [ ] 32x16 | Optimize , NoGlobals , BaseIteration [ ] 32x16 | SteadyAdjoint , NoGlobals , BaseIteration [ ] 32x16 | Primal , IntegrateGlobals , BaseIteration [ ] 32x16 | Tangent , IntegrateGlobals , BaseIteration [ ] 32x16 | Optimize , IntegrateGlobals , BaseIteration [ ] 32x16 | SteadyAdjoint , IntegrateGlobals , BaseIteration [ ] 32x16 | Primal , OnlyObjective , BaseIteration [ ] 32x16 | Tangent , OnlyObjective , BaseIteration [ ] 32x16 | Optimize , OnlyObjective , BaseIteration [ ] 32x16 | SteadyAdjoint , OnlyObjective , BaseIteration [ ] 32x16 | Primal , NoGlobals , BaseInit [ ] 32x16 | Tangent , NoGlobals , BaseInit [ ] 32x16 | Optimize , NoGlobals , BaseInit [ ] 32x16 | SteadyAdjoint , NoGlobals , BaseInit [ ] 32x16 | Primal , IntegrateGlobals , BaseInit [ ] 32x16 | Tangent , IntegrateGlobals , BaseInit [ ] 32x16 | Optimize , IntegrateGlobals , BaseInit [ ] 32x16 | SteadyAdjoint , IntegrateGlobals , BaseInit [ ] 32x16 | Primal , OnlyObjective , BaseInit [ ] 32x16 | Tangent , OnlyObjective , BaseInit [ ] 32x16 | Optimize , OnlyObjective , BaseInit [ ] 32x16 | SteadyAdjoint , OnlyObjective , BaseInit [ ] [0] Cumulative allocation of 14853696 b (14.9 MB) [ ] Creating geom size:102400 [ ] Setting output path to: karman [ ] Setting output path to: output/karman [ ] loading geometry ... [ ] Setting number of zones to 3 [ ] Setting VelocityX in zone (-1) to 0.01 (0.010000) [ ] Setting Viscosity to 0.02 (0.020000) [ ] [0] Settings [viscosity] to 0.020000 [ ] [0] Settings [one over relaxation time] to 1.785714 [ ] [0] Settings [MRT Sx] to -0.785714 [ 0] WARNING: Unknown setting Smag [ 0] WARNING: Unknown setting PressDiffInObj [ 0] WARNING: Unknown setting EOSScale [ 0] WARNING: Unknown setting Tension [ 0] WARNING: Unknown setting Coriolis [ 0] WARNING: Unknown setting SolidAlfa [ 0] WARNING: Unknown setting FluidAlfa [ 0] WARNING: Unknown setting InitTemperature [ 0] WARNING: Unknown setting InletTemperature [ ] Initializing Lattice ... [ ] Setting callback VTK at 1000.000000 iterations======] 0s [ ] Adding VTK to the solver hands [ ] Setting action Solve at 10000.000000 iterations [ ] 427.0 MLBUps 62.34 GB/s [====================] 0s [ ] 1000 it writing vtk [ ] 436.1 MLBUps 63.67 GB/s [====================] [ ] 2000 it writing vtk [ ] 389.5 MLBUps 56.87 GB/s [====================] [ ] 3000 it writing vtk [ ] 437.6 MLBUps 63.88 GB/s [====================] [ ] 4000 it writing vtk [ ] 392.3 MLBUps 57.28 GB/s [====================] [ ] 5000 it writing vtk [ ] 444.7 MLBUps 64.93 GB/s [====================] [ ] 6000 it writing vtk [ ] 399.2 MLBUps 58.28 GB/s [====================] [ ] 7000 it writing vtk [ ] 417.4 MLBUps 60.93 GB/s [====================] [ ] 8000 it writing vtk [ ] 413.3 MLBUps 60.34 GB/s [====================] [ ] 9000 it writing vtk [ ] 426.8 MLBUps 62.32 GB/s [====================] [ ] 10000 it writing vtk [ ] Total duration: 2.543770 s = 0.042396 min = 0.000707 h