|
[Sponsors] |
November 28, 2017, 07:46 |
gust addition through y-momentum source term
|
#1 |
New Member
Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 8 |
Dear members;
i have been trying to add a vertical gust through momentum source udf. i have succeeded in compiling and running the udf, however there remains a problem which i could not understand as yet. my main concern is what should be the value of source so as to induce a perturbation of 15m/s as y-gust component. how is the value of source calculated? Can someone please answer the querry. my udf is as follows. # include "udf.h" DEFINE_SOURCE(gust,cell,thread,dS,eqn) { real source=0.0; real PI=3.14; real XGS=-7.5; /* X-center of source*/ real YGS=0.0; /* Y-center of source*/ real ZGS=0.0; /* Z-center of source*/ real X= 1.0; /* X, Y, Z dimensions make the source-Volume=1m^3*/ real Y= 1.0; real Z= 1.0; real t = CURRENT_TIME; real centroid[ND_ND]; C_CENTROID(centroid,cell,thread); real x_loc=centroid[0]; real y_loc=centroid[1]; real z_loc=centroid[2]; if (t>1.0 && t<1.2) { if (fabs(x_loc-XGS)<X && fabs(y_loc-YGS)<Y && fabs(z_loc-ZGS)<Z) { real rho=C_R(cell,thread); real vol=C_VOLUME(cell,thread); source=((rho*(15.0+C_V(cell,thread))/CURRENT_TIMESTEP))/vol; /*15(m/s) is perturbation in Y direction*/ dS[eqn]=0.0; } } else { source=0.0; dS[eqn]=0.0; } return source; } Last edited by mmj_blackforce; November 29, 2017 at 09:05. Reason: more elaborate |
|
November 28, 2017, 09:40 |
|
#2 |
New Member
Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 8 |
Hi everyone,
Can anyone please explain the relation between velocity and momentum source term equation? Last edited by mmj_blackforce; November 29, 2017 at 01:32. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 08:06 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 21:53 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 13:59 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |