Closed AndreWeiner closed 3 years ago
Dear Andre,
In the recent commit, I implemented a function that finds 'u_tau' in the notebook. However, I found that the function yields the 'u_tau' that is the same with the initial 'u_tau'. (In OpenFOAM code, it will be sqrt((nutw[facei] + nuw[facei])*magGradU[facei])
.)
In C++ file, y[facei]
will be replaced with y_p_int[facei]
calculated by Spalding's Function with the input of 'u_p_int', and magUp[facei]
will be replaced with u_p_int[facei]
, where 'u_p_int' is the integral based cell center velocity and 'y_p_int' is the integral based cell center height.
I expected that the function gives the different value from the initial one, but the result is the same with the initial value. Therefore, I am not sure which role this function has (even the original 'calcUTau' function in OpenFOAM as well). I can think that the function has two possible features as follows:
Currently, I am getting stuck of my thinking process, and therefore I need more time to figure out why it happens. However, I would like to report the situation in the issue.
Thank you for reading this comment.
Best regards, Jihoo Kang
Dear Jihoo,
usual wall functions work as follows:
What changes in our approach:
Best, Andre
Dear Andre,
In the last meeting, I was informed that the test of the integral method (the function 'function_intCombined') should be done as follows:
assert(abs(u_tau_true - u_tau_iter) < eps)
However, after I tested it, I had a feeling that the test cannot properly be carried out. Step 2 computes y via Spalding's Function, and therefore only the numerical methods that explicitly use Spalding's Function to find the velocity 'u_tau' can yield the same value. In case of the integral method, we need to let 'u_p_int' be the same with 'u_sim' by Secant Method, then find 'u_tau'. When we calculate 'u_p_int' by the numerical integration, we can observe that 'u_p_int' is smaller than the velocity from the simulation 'u_sim'.
For example, for given 'u_sim' and 'u_tau_true' with the identical condition for the other variables,
u_sim = 20
Given u_tau_true = 3
u_p_int = 17.864131474496343
With the number of iteration = 6, Calculated u_tau = 3.2207815264282478
Thus, when the equation u_p_int = u_sim
holds, 'u_tau_iter' will intrinsically be greater than 'u_tau_true'.
I came up with a test method that uses the function 'integralNewton' which finds 'u_p_int' to compare with both 'u_p_int' values. But this method is also not valid because the integral method exists for the condition of the equation u_p_int = u_sim
, and hence the initial 'u_p_int' cannot be the same with 'u_p_int' (= u_sim) in the method.
I hope to find any test method for the integral method, but I couldn't come up with any idea. In addition, I'm not sure if I understood the situation correctly. Therefore, I would like to report it in this issue.
Thank you for reading this comment.
Best regards, Jihoo Kang
Dear Jihoo, it's not a direct answer to your question, but I have started to revise the notebook. Please, have a look at the changes and try to revise the rest of the notebook. Maybe clearing up code and documentation also clears up the ideas ;-) Best, Andre
Hi Jihoo, let's use this issue to derive the integral fitting step by step; I'll update this post after each completed step. The basic idea is as follows:
Say u_p is the cell-centered velocity. We want to find the friction velocity u_tau based on Spalding's formula such that the average velocity computed using Spalding's equations equals u_p. u_tau needs to be found iteratively.
Let's start as follows:
Best, Andre