CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Unsteady velocity

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 13, 2006, 15:54
Default Unsteady velocity
  #1
Vidya Raja
Guest
 
Posts: n/a
Hi,

I'm using a UDF for my flow simulation. I have a couple questions.

I'm expecting the flow waveform to show up on the screen, but for some reason, it doesn't. My UDF is for an unsteady velocity in the form of A+B* sin(2*pi*f*t). I don't see the flow waveform being plotted anywhere.

My other question is that after compiling the UDF, do we need to use the Define- User defined- Functions- Hooked option for anything? I have already mentioned that the UDF is for the velocity inlet in the BC panel.

Also, when I check the option to plot the residuals, I immediately get an error on the screen that says:

Error: CAR: invalid argument [1]: wrong type: not a pair

What does this mean? How can it be fixed?

Thanks.

Vidya
  Reply With Quote

Old   June 13, 2006, 18:48
Default Re: Unsteady velocity
  #2
Fabrice
Guest
 
Posts: n/a
Hi Vidya,

Concerning your UDF, you can either compile it or interprete it. You don't need to use the Define- User defined- Functions- Hooked option.

To plot the velocity, you must simply go on the display panel. Then you select contours or vectors (depending on what you want to check) and be sure that none surface has been selected (above all the grid) otherwise you can't see anything.

As far as your residuals display is concerned, I think it's simply because you didn't launch the calculation!!! First of all you have to launch the calculation and then ask Fluent to plot the residuals. Or you can tick the plot option in the residuals panel and it will automatically display the residuals when the calculation is running.

Regards,

Fabrice.
  Reply With Quote

Old   June 13, 2006, 22:11
Default Re: Unsteady velocity
  #3
Vidya Raja
Guest
 
Posts: n/a
Hi Fabrice,

Thanks for the reply. Can you please explain what you meant by "Launch calculation"? I did check the PLOT option in the residuals panel and could see the residuals being plotted.

But my question is why can't I see the actual waveform of my UDF? For eg., if my waveform was a sine wave, I should see the sine wave, right?

Thanks and regards, Vidya
  Reply With Quote

Old   June 13, 2006, 23:03
Default Re: Unsteady velocity
  #4
Fabrice
Guest
 
Posts: n/a
Hi Vidya,

By "launch the calculation" I mean: to run, to proceed the calculation of the solution.

So for the display of the velocity defined by your UDF, you can do as followed:

Solve->monitors->surface.Increase the counter to 1.Tick "plot" if you want to plot the velocity profile during the calculation and "write" if you want to save a file. Under "every" select "time step". Then click "define". Under "report type" select "area-weighted average", under "X axis" select "flow time", under "report of" select "velocity"->"velocity magnitude" (or X-velocity or Y-velocity, it depends on which component of the velocity you define). Under "surfaces", select the right surface of your boundary. Click "ok" and then run the calculation. Be aware that Fluent will compute the absolute value of the velocity on the boundary.....

If you save a file and then want to plot it, go in the plot panel, select "file" and then "add" and click "plot". Check if the results are good (it will be the absolute value...).

Regards,

Fabrice.
  Reply With Quote

Old   June 14, 2006, 07:54
Default Re: Unsteady velocity
  #5
Vidya Raja
Guest
 
Posts: n/a
Hi Fabrice,

Thanks for the reply. I'll follow your suggestions and see what happens. Will let you know if there are any problems.

My other problem is that I get the following error messages continuously during the calculation and the solution is not converging even after a day of calculation.

REVERSED FLOW IN 298 FACES ON OUTFLOW 4.

ERROR: Floating Point error: Invalid number

Error Object )

What does this mean? It is occuring after every iteration.

Thanks and regards, Vidya
  Reply With Quote

Old   June 14, 2006, 09:07
Default Re: Unsteady velocity
  #6
Fabrice
Guest
 
Posts: n/a
Hi,

Reversed flow means that your flow re-enters in the flow domain. It can occur if your boundary is too close to your object of study. What I suggest you is to enlarge your domain of study if possible, to avoid this problem. Otherwise you can change the type of your boundary if possible. Anyway reversed flow is not a problem for the calculation and I'm not sure that the error message is relevant to the reversed flow.

As far as your residuals are concerned is difficult to tell you something because I don't even know your project of study. What I can advise you is to do an initialisation NOT to close to the final solution; to be sure that the discretization of the pressure and velocity is at the right order of accuracy (maybe you need second order of accuracy,it depends on what you study....); decrease your time step (if your case is an unsteady one). The problem can also come from your mesh if it is too coarse.... But the residuals are not an absolute criterion of solution convergence. You have to check the properties of your flow (mass flow rate, velocity,pressure,...; in fact everything that can be forecast in your model to check the relevancy of the solution).

Finally I think that you study an unsteady case (depending on time) and would like to know if you use a dynamic mesh because this is my case and I've got problem with the mesh updating....

Thanks and Regards,

Fabrice.
  Reply With Quote

Old   June 14, 2006, 11:27
Default Re: Unsteady velocity
  #7
Vidya Raja
Guest
 
Posts: n/a
Hi Fabrice,

I too think there might be reversed flow in my geometry... the possibility cannot be ruled out. However, I will try changing the order of accuracy and the other things that you suggested.

Right now, I'm just using a static mesh, but since I'm modeling flow in a valve of the human artery and the artery walls move with heart beat, I'll need to use a dynamic mesh later on.

What does your project deal with and how are you managing the dynamic mesh? I have no idea how to deal with it.

Thanks and regards, Vidya

  Reply With Quote

Old   June 14, 2006, 19:15
Default Re: Unsteady velocity
  #8
Vidya Raja
Guest
 
Posts: n/a
Hi Fabrice,

I changed to the second order upwinding scheme, and also reduced my time step size by a factor of 100. Still I get the same error:

Error: CAR: Invalid argument [1] : wrong type: not a pair

Error: floating point error: divide by zero

Error Object )

My mesh is coarse, but if I try to refine it, it either goes beyong Gambit's capacity or sometimes doesn't mesh at all.

Any suggestions?

Thanks, Vidya
  Reply With Quote

Old   June 14, 2006, 19:19
Default Re: Unsteady velocity
  #9
Fabrice
Guest
 
Posts: n/a
Hi Vidya,

So my project deals with oscillating disks in water at rest. I have to calculate several hydrodynamic coefficients on these disks.

Furthermore to implement a dynamic mesh, it's really too long to explain you. The chapter 10.6 of the user's guide is dedicated to this topic and you should read it.

Regards,

Fabrice.
  Reply With Quote

Old   June 16, 2006, 02:21
Default Re: Unsteady velocity
  #10
Madhukar Rapaka
Guest
 
Posts: n/a
Hi Vidya,

you can change the default valuse for the mesh in Gambit, so that u can generate more number of mesh elements. To do this go to the EDIT menuthen to DEFAULTS...there u can find different options...go to MESH and there u can change the default no. for the mesh elements....

hope this helps

regards
  Reply With Quote

Old   June 18, 2006, 07:14
Default Re: Unsteady velocity
  #11
Fabrice
Guest
 
Posts: n/a
Hi Vidya,

To refine your mesh properly, use size functions. There is a chapter dedicated to this topic in Gambit manual.

Fabrice.
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for a Unsteady velocity change Paul FLUENT 8 August 29, 2011 02:19
Emergency:UDF for a time dependent parabolic velocity zumaqiong Fluent UDF and Scheme Programming 12 March 25, 2010 13:00
Modeling Unsteady Velocity Vidya Raja FLUENT 0 February 19, 2006 17:52
Modeling Unsteady velocity in Fluent Vidya Raja Main CFD Forum 0 November 11, 2005 17:11
Unsteady Velocity - UDF in parallel Prateep Chatterjee FLUENT 4 November 23, 2001 05:40


All times are GMT -4. The time now is 14:51.