|
[Sponsors] |
Trouble Saving Wall Shear using DEFINE_EXECUTE_AT_END |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2016, 12:59 |
Trouble Saving Wall Shear using DEFINE_EXECUTE_AT_END
|
#1 | ||
Member
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12 |
I'm trying to access the wall shear stress values for a certain wall. I'm trying to replicate the method used by here (p.91) and here (p.2) .
My UDF right now is: Code:
#include "udf.h" #include "storage.h" DEFINE_EXECUTE_AT_END(store_wall_shear) { FILE *fp = NULL; char filename[] = "shear.txt"; double NV_VEC(Wall_Shear_Force); Domain *d; Thread *t; face_t f; cell_t c; d = Get_Domain(1); /* Domain ID integer is 1 for single phase flows*/ t = Lookup_Thread(d,9); /* wall zone ID*/ fp = fopen(filename,"a"); Wall_Shear_Force[0] = F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[0]; fprintf(fp,"Test2 \n"); fclose(fp); } Quote:
Quote:
Do I need to calculate the shear stress directly to be able to access it or is there another step I need to take to make it available? |
|||
November 6, 2016, 18:35 |
|
#2 |
Member
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12 |
From that link, am I correct in interpreting the following?
Wall_Shear_stress_X is Tau_xy Wall_Shear_stress_Y is Tau_yz Wall_Shear_stress_Z is Tau_zx |
|
November 6, 2016, 18:53 |
|
#3 |
Member
Join Date: Jun 2011
Posts: 86
Rep Power: 15 |
As far as I am aware:
Tx = [Nx*Mu*(2*Du/Dx)]+[Ny*Mu*(Du/Dy+Dv/Dx)]+[Nz*Mu*(Du/Dz+Dw/Dx)] Ty = [Nx*Mu*(Dv/Dx+Du/Dy)]+[Ny*Mu*(2*Dv/Dy)]+[Nz*Mu*(Dv/Dz+Dw/Dy)] Tz = [Nx*Mu*(Dw/Dx+Du/Dz)]+[Ny*Mu*(Dw/Dy+Dv/Dz)]+[Nz*Mu*(2*Dw/Dz)] T = sqrt(Tx^2+Ty^2+Tz^2) |
|
November 7, 2016, 12:28 |
|
#4 |
Member
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12 |
I found this forum thread about using F_STORAGE.
I exported the shear stresses from the UDF and plotted them and compared to the shear stress plots provided by Fluent and they're the same. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
different order for wall shear stress result in steady & unsteady simulatiom | raminostadi | FLUENT | 0 | October 1, 2016 12:23 |
Cannot achieve negative wall shear stress values in CFD Post (ANSYS) | SAtkins | CFX | 3 | August 3, 2016 15:27 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
how to resolve high gradients of wall shear? | Agad15 | FLUENT | 0 | June 10, 2014 00:59 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |