summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-07-11 18:40:53 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-07-11 18:40:53 +0200
commit2ebda9f758026377f1d9a2e749e905c4bcdda6e5 (patch)
tree223486236fcfa195361da5b9c755ffc832e3c8f0
parent869974982752cd37e808283af629ea0bbb680393 (diff)
Config shit
-rw-r--r--examples/config.json6
-rw-r--r--examples/poiseulle_2d.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/config.json b/examples/config.json
index 5ce6b4e..7c6d3a2 100644
--- a/examples/config.json
+++ b/examples/config.json
@@ -1,5 +1,5 @@
{
- "delta_x" : 0.01,
- "delta_t" : 0.05,
- "kinematic_viscosity" : 1e-4
+ "delta_x" : 1.0,
+ "delta_t" : 1.0,
+ "kinematic_viscosity" : 3e-2
}
diff --git a/examples/poiseulle_2d.cpp b/examples/poiseulle_2d.cpp
index 54623f7..4c0dc34 100644
--- a/examples/poiseulle_2d.cpp
+++ b/examples/poiseulle_2d.cpp
@@ -78,7 +78,7 @@ private:
public:
component(const saw::data<FP>& pressure_setting__):
pressure_setting_{pressure_setting__},
- rho_setting_{pressure_setting__}
+ rho_setting_{pressure_setting__ * df_info<FP,Descriptor>::inv_cs2}
{}
template<typename CellFieldSchema>
@@ -104,7 +104,7 @@ public:
}
}
constexpr int known_dir = East ? 1 : 1;
- auto sum_unknown_dfs = (pressure_setting_ - sum_df) * saw::data<FP>{known_dir};
+ auto sum_unknown_dfs = (rho_setting_ - sum_df) * saw::data<FP>{known_dir};
for(saw::data<sch::UInt64> k{0u}; k < saw::data<sch::UInt64>{Descriptor::Q}; ++k){
auto c_k = dfi::directions[k.get()];
@@ -118,7 +118,7 @@ public:
}
}
- auto vel_x = sum_unknown_dfs / pressure_setting_;
+ auto vel_x = sum_unknown_dfs / rho_setting_;
if constexpr (East) {
dfs_old({2u}) = dfs_old({1u}) + saw::data<FP>{2.0 / 3.0} * rho_setting_ * vel_x;
@@ -233,8 +233,8 @@ void lbm_step(
*/
component<sch::T, sch::D2Q9, cmpt::BGK> coll{0.5384};
component<sch::T, sch::D2Q9, cmpt::BounceBack> bb;
- component<sch::T, sch::D2Q9, cmpt::PressureBoundaryRestrictedVelocityTo<true>> inlet{1.1};
- component<sch::T, sch::D2Q9, cmpt::PressureBoundaryRestrictedVelocityTo<false>> outlet{0.9};
+ component<sch::T, sch::D2Q9, cmpt::PressureBoundaryRestrictedVelocityTo<true>> inlet{1.001};
+ component<sch::T, sch::D2Q9, cmpt::PressureBoundaryRestrictedVelocityTo<false>> outlet{1.0};
auto meta = latt.meta();