# Momentum source term

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 5, 2016, 21:39 Momentum source term #1 New Member   AnsysUser Join Date: Jul 2016 Posts: 9 Rep Power: 9 Dear All, could you help me to resolve issue with my UDF function. I am trying to implement gust in Ansys Fluent. It was already implemented with different software in AIAA research paper. In the picture QuestionSource.jpg square box is the region where gust is generated and it is carried by mean flow. i.e. yellow and blue contours move to the right. (This picture was taken from the paper I mentioned above) Basically I just need to add source term in x and y momentum equations. However, for some reason when I look at vorticity contours (another picture QuestionAnsysRes.PNG) I can see only vorticity generated in source region, it does not move in x direction. Could you, please, tell me what is wrong with my udf function? For the run I use: Pressure based solver, Transient Energy on Viscous SST k-omega Scheme: PISO Second order Upwind Boundary conditions: airfoil is a no-slip wall; inlet is a pressure far field; (velocity 170m/s, mach 0.5 ,standard sea level conditions) outlet is pressure outlet; Here is my udf function for source in x momentum Sx) {function for Sy is similar} #include "udf.h" DEFINE_SOURCE(harmGustX, cell, thread, dS, eqn) { real source=0; real PI=3.14159; real GOMEGA=2; // circular frequency real GEPS=80;//amplitude of gust real GTANGLE=1.0;//inclination of gust real XGS=-1.5; // x-centre of my source real YGS=2.5; // y-height of the source real BGS=5; //pi/BGS is width of my source region real dth=10.0; // gust duration real dts=0.02; // gust start time real flowTime=CURRENT_TIME; real centroid[2]; C_CENTROID(centroid,cell,thread); real x_loc=centroid[0]; real y_loc=centroid[1]; real rho=C_R(cell,thread); real vol=C_VOLUME(cell,thread); real GVEL=170.0; //freestream velocity real GALF=GOMEGA*85/GVEL;//wavenumber in x direction (reduced //frequency) kx real GBET=GALF*GTANGLE;//wavenumber in y direction ky // this if checks if time came to start adding source to the right hand side of Navier Stokes(NS) if(flowTime>dts && flowTime

 December 6, 2016, 04:28 #2 New Member   Johannes Hall Join Date: Sep 2016 Posts: 21 Rep Power: 9 Hello! Very late reply here but I was trying with the same source term and I didn't really get satisfying results neither. However, the finer the mesh the better results. Did you find a good way to a solution or another way to simulate a gust? Regards, Johannes

 December 6, 2016, 09:23 Reply #3 New Member   AnsysUser Join Date: Jul 2016 Posts: 9 Rep Power: 9 We are still doing research on gust simulation. How do you evaluate if results are satisfying or not? -Shreman

 December 7, 2016, 11:44 #4 New Member   Johannes Hall Join Date: Sep 2016 Posts: 21 Rep Power: 9 Should I interpret your reply as if you didn't continue with the momentum source term approach? You can plot a line over the domain to see how the velocity differs at different y-values or plot a points value over time, that's a good way to see how the gust behaves Regards

November 16, 2017, 07:58
#5
New Member

Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 7
Quote:
 Originally Posted by Shreman We are still doing research on gust simulation. How do you evaluate if results are satisfying or not? -Shreman
Dear Shreman and Johannes Hall:

may you please tell if the approach explained in this thread worked? or did you use some other technique.
Regards

November 16, 2017, 11:19
#6
New Member

AnsysUser
Join Date: Jul 2016
Posts: 9
Rep Power: 9
Quote:
 Originally Posted by mmj_blackforce Dear Shreman and Johannes Hall: may you please tell if the approach explained in this thread worked? or did you use some other technique. Regards
Dear misa,

for the gust simulation ,mentioned thread worked well .

November 21, 2017, 02:49
#7
New Member

Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 7
Quote:
 Originally Posted by Shreman Dear misa, for the gust simulation ,mentioned thread worked well .
Quote:
 Originally Posted by Shreman Dear misa, for the gust simulation ,mentioned thread worked well .
Dear Shreman,

Firstly thank-you for your reply, i tried to use your udf for gust simulation and need few clarification. when you find time please do reply i really need help.

(a) What does the "UTERM" stands for if it is velocity in x direction how did you calculate it, what formulae did you use to define "UTERM"

(b) Why have you defined width of source region as "PI/BGS" can it be BGS

(c) Why is the ds[eqn] term equal to zero

(d) Why have you not included the gust perturbation in the source equation is it embedded in the "UTERM"

Regards
Misa