Open Armin268 opened 1 year ago
I tried out the code. If I set V0 = 0, it gives me the correct result that z velocity is 0. If I set it to 2 like you have, then I find the z velocity is 0.07. Maybe you were expecting it to be 2 in that case? It is not 2 because you are adding terms to an un-normalized distribution function F, so you either need to add the appropriate normalization where you add V0 to F, or multiply V0 to get the desired velocity in the simulation
Thank you for the prompt answer. Oh, really? I tried to check the velocity in z direction by "print (uz)" after "# Apply boundary" section. But even after setting V0 = 0, I got something around 0.07267267! Could you please explain how you achieved a zero velocity in the z-direction by V0 = 0? Thank you.
I have one more inquiry related to the obstacles (cylinder) in your code. I would like to incorporate moving spherical obstacles in this 3D code, where the particles move in each iteration. My ultimate goal is to couple LBM with DEM ! I must say, your code has been incredibly helpful for me. I am just curious whether it is feasible to implement the particle scenario I described within your code. Thank you for your valuable assistance.
Thank you for providing the code. I attempted to transform the 2D code into a 3D (D3Q15) simulation. Although the new code runs, I encountered an issue with the computed velocities not matching the desired results accurately. For instance, when attempting to simulate still water (no velocity) in the Z direction, the computed value was 0.07, which significantly deviates from the expected value of 0.
I would appreciate your assistance in resolving this matter. Please let me know if you need any further information or if there are specific areas of the code that require attention to achieve the desired simulation outcome.
import numpy as np import os import sys import math import re import pandas as pd import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D
def main (): #######################################################################
if name== "main": main()