Modify gravity via UDF
Hello, i need some help.
I am going to simulate a braking process in a tank, filled with water. so, therefore i do like to modify the x-gravity in udf. z-gravity is const = -9.81 m/sē. has anyone an idea how to adress the x-gravity component in the udf? this is my attempt for the udf: DEFINE_SOURCE(gx_source, c, t, dS, eqn) { real gx_source; real time = RP_Get_Real("flow-time"); if (time <= 0.4) { gx_source = 2 * pow(10,-9) * pow(time,4) + 296.74 * pow(time,3) - 178.05 * pow(time,2) + 2.6377 * time - 0.0296; } else if(time <= 3.1) { gx_source = -8.5; } else if(time <= 3.5) { gx_source = -2 * pow(10,-9) * pow(time,4) - 296.74 * pow(time,3) + 2937.8 * pow(time,2) - 9661.7 * pow(time,1) + 10551; } return (gx_source); } many thanks for your help! |
Hi
The way you are incorportaing gx is correct. It will be body force/source in x momentum equaion. Please check on units of gx. It should be N/m^3. Best luck Vaze |
Hello vaze, first of all: thank you for your reply.
I found something like -> C_R(c,t) and C_P(C,t). How do i have to use it now? I mean, do i have to multiplicate or to divide the gx-source with the C_R(C,t)/C_P(C,t)? For a testrun i multiplicated it, the visiualisation looked similar to the case, as if i use constant gravity in x direction. Furthermore, do C_R/C_P depend on the solver i use (pressure-based/density-based)? |
Hi
static pressure = rho * gx * z or x distance Check that C_P corresponds to static pressure or not. if not then deduce it. all the best, Vaze |
All times are GMT -4. The time now is 13:03. |