Flux of UDS
I have created a UDS which runs nicely, however I want to specify the flux at the walls of the aircraft wing to be the same as pressure flux. I used the following code:
DEFINE_PROFILE(UDSP, t, i) { real x[ND_ND]; /* this will hold the position vector */ real y, h; face_t f; real A[ND_ND]; begin_f_loop(f,t) { F_CENTROID(x, f, t); F_AREA(A,f,t); F_PROFILE(f, t, i) = A[0]*C_P_G(f,t)[0]+A[1]*C_P_G(f,t)[1]+A[2]*C_P_G(f,t)[2]; } end_f_loop(f, t) } however I keep getting an error. Any help would be appreciated |
Error
What error do you get? If it's related to segmentation violation, then that's because pressure gradient is unavailable. You need to issue following command
sol set exp And then answer yes to the question regarding keeping the memory from being freed. |
Quote:
As soon as I choose it as the flux BC and select okay I receive the following error Node 0: Process 28373: Received signal SIGSEGV. |
Segmentation Violation
SIGSEGV implies segmentation violation. Most likely, pressure gradient is unavailable. The solution was mentioned in the previous post.
|
I appreciate the suggestion but still no success! The same error persists
|
Gradient
I just noticed the bug. You are using C_P_G with f as its argument. That won't work. You have to use it like as follows
cell_t c; Thread *ct; ct = THREAD_T0(t); And within the loop c = F_C0(f, t); C_P_G(c, ct)[0]; |
Watch your task manager when you do it, do you run out of RAM?
|
All times are GMT -4. The time now is 07:32. |