Skip to content

Commit

Permalink
Issue 46 Multicore Version is not deterministic (FireDynamics#66)
Browse files Browse the repository at this point in the history
Restructure because of difference between architectures as well more structure, it now has less difference, but it is still there
* source functions were rewritten as own classes to prevent repetitive calculation of non-changing values, for example, the space values of the gauss function. This also solves the problem regarding the non-deterministic multicore version.
* new classes FieldController and SolverController for more structure. In Field Controller is everything regarding the fields (U, V, W, P, etc) and in Solver Controller everything regarding specific actions for the different solvers. Following, the interface ISolver.cpp is no longer, its functionality was divided into the two new classes.
* rewritten momentum source. There was no real buoyancy because it calculated the difference between two identical fields, now it calculates the difference between the temperature field and the ambient temperature field. This requires new options in the XML, which now has a function use_init_values=Yes/No for the force function Buoyancy, which sets the ambient temperature field to a given value (ambient_temperature_value) or to the given initial condition(s).
* added cube as source function
  • Loading branch information
LinhWuerzburger authored Nov 3, 2020
1 parent 0f81610 commit 0e75391
Show file tree
Hide file tree
Showing 101 changed files with 3,002 additions and 2,336 deletions.
19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ set(SOURCE_FILES
"src/diffusion/ExplicitDiffuse.cpp"
"src/diffusion/JacobiDiffuse.cpp"

"src/field/Field.cpp"
"src/field/FieldController.cpp"

"src/interfaces/IPressure.cpp"
"src/interfaces/ISolver.cpp"
"src/interfaces/ISource.cpp"

"src/pressure/VCycleMG.cpp"
Expand All @@ -204,9 +206,13 @@ set(SOURCE_FILES
"src/solver/NSTempTurbSolver.cpp"
"src/solver/NSTempTurbConSolver.cpp"
"src/solver/PressureSolver.cpp"
"src/solver/SolverController.cpp"
"src/solver/SolverSelection.cpp"

"src/source/BuoyancyMMS.cpp"
"src/source/Cube.cpp"
"src/source/ExplicitEulerSource.cpp"
"src/source/GaussFunction.cpp"

"src/turbulence/ConstSmagorinsky.cpp"
"src/turbulence/DynamicSmagorinsky.cpp"
Expand All @@ -221,7 +227,6 @@ set(SOURCE_FILES
"src/visualisation/visit_writer.cpp"

"src/Domain.cpp"
"src/Field.cpp"
"src/Functions.cpp"
"src/TimeIntegration.cpp"
)
Expand Down Expand Up @@ -251,12 +256,16 @@ set(HEADER_FILES
"src/diffusion/ExplicitDiffuse.h"
"src/diffusion/JacobiDiffuse.h"

"src/field/Field.h"
"src/field/FieldController.h"

"src/interfaces/IAdaptionFunction.h"
"src/interfaces/IAdvection.h"
"src/interfaces/IDiffusion.h"
"src/interfaces/IPressure.h"
"src/interfaces/ISolver.h"
"src/interfaces/ISource.h"
"src/interfaces/ISourceFunction.h"
"src/interfaces/ITurbulence.h"

"src/pressure/VCycleMG.h"
Expand All @@ -272,9 +281,14 @@ set(HEADER_FILES
"src/solver/NSTempTurbSolver.h"
"src/solver/NSTempTurbConSolver.h"
"src/solver/PressureSolver.h"
"src/solver/SolverController.h"
"src/solver/SolverSelection.h"

"src/source/BuoyancyMMS.h"
"src/source/Cube.h"
"src/source/ExplicitEulerSource.h"
"src/source/GaussFunction.h"
"src/source/Zero.h"

"src/turbulence/ConstSmagorinsky.h"
"src/turbulence/DynamicSmagorinsky.h"
Expand All @@ -290,7 +304,6 @@ set(HEADER_FILES
"src/visualisation/visit_writer.h"

"src/Domain.h"
"src/Field.h"
"src/Functions.h"
"src/GlobalMacrosTyper.h"
"src/TimeIntegration.h"
Expand Down
20 changes: 13 additions & 7 deletions examples/Test_NavierStokesTempTurb_OpenPlume.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
<solver description="NSTempTurbSolver" >
<advection type="SemiLagrangian" field="u,v,w">
</advection>
<diffusion type="Jacobi" field="u,v,w">
<diffusion type="Explicit" field="u,v,w">
<max_iter> 100 </max_iter> <!-- max number of iterations -->
<tol_res> 1e-07 </tol_res> <!-- tolerance for residuum/ convergence -->
<w> 1 </w> <!-- relaxation parameter -->
</diffusion>
<turbulence type="ConstSmagorinsky">
<Cs> 0.2 </Cs>
</turbulence>
<source type="ExplicitEuler" force_fct="Buoyancy" dir="y"> <!--Direction of force (x,y,z or combinations xy,xz,yz, xyz) -->
<source type="ExplicitEuler" force_fct="Buoyancy" dir="y" use_init_values="No"> <!--Direction of force (x,y,z or combinations xy,xz,yz, xyz) -->
<ambient_temperature_value> 300 </ambient_temperature_value>
</source>
<pressure type="VCycleMG" field="p">
<n_level> 6 </n_level> <!-- number of restriction levels -->
Expand All @@ -37,7 +38,7 @@
<temperature>
<advection type="SemiLagrangian" field="T">
</advection>
<diffusion type="Jacobi" field="T">
<diffusion type="Explicit" field="T">
<max_iter> 100 </max_iter>
<tol_res> 1e-07 </tol_res>
<w> 1 </w>
Expand All @@ -51,9 +52,9 @@
<x0> 0. </x0>
<y0> 1. </y0>
<z0> 0.1 </z0>
<sigmax> 0.1 </sigmax>
<sigmay> 0.1 </sigmay>
<sigmaz> 0.1 </sigmaz>
<sigma_x> 0.1 </sigma_x>
<sigma_y> 0.1 </sigma_y>
<sigma_z> 0.1 </sigma_z>
<tau> 5. </tau>
</source>
</temperature>
Expand Down Expand Up @@ -94,7 +95,12 @@

<surfaces enabled="No"/>

<initial_conditions usr_fct="Uniform" random="No">
<initial_conditions usr_fct="Uniform" random="Yes">
<random custom_seed="Yes" custom_steps="Yes" absolute="Yes">
<seed> 1 </seed>
<step_size> 1 </step_size>
<range> 10 </range>
</random>
<val> 303.64 </val>
</initial_conditions>

Expand Down
Loading

0 comments on commit 0e75391

Please sign in to comment.