|
[Sponsors] |
April 2, 2013, 03:11 |
modify gravity
|
#1 |
New Member
Sumit Tambe
Join Date: Feb 2013
Posts: 8
Rep Power: 13 |
I want to define x component of gravity as a sinusoidal function of time, how to do it?
Any UDF? what is Journal file and how do i use it here? Or is there any way by which I can modify body force term in N-S equations? |
|
April 2, 2013, 03:25 |
|
#2 |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
You can use DEFINE_SOURCE to add your gravity momentum source(N/m3) into x momentum equation.
|
|
April 2, 2013, 03:38 |
|
#3 |
New Member
Sumit Tambe
Join Date: Feb 2013
Posts: 8
Rep Power: 13 |
[QUOTE=gearboy;417743]You can use DEFINE_SOURCE to add your gravity momentum source(N/m3) into x momentum equation.
Thanx a lot, got it. used CURRENT_TIME as time variable. UDF Manual also helped. Last edited by Tamsu; April 2, 2013 at 06:40. |
|
November 5, 2014, 06:27 |
|
#4 |
New Member
Join Date: Sep 2014
Posts: 3
Rep Power: 12 |
I am facing same problem...
Can u tell me steps to follow? Plz mail me udf for this nirajpaliwal1312@gmail.com |
|
November 5, 2014, 06:40 |
|
#5 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You can use DEFINE_SOURCE to add your gravity momentum source(N/m3) into x momentum equation.
Use CURRENT_TIME as time variable. UDF Manual can also help. Quote:
|
||
November 6, 2014, 07:36 |
|
#6 |
Senior Member
Stuart Buckingham
Join Date: May 2010
Location: United Kingdom
Posts: 267
Rep Power: 26 |
||
January 30, 2016, 14:00 |
|
#7 |
New Member
Join Date: Nov 2015
Posts: 17
Rep Power: 11 |
This thread is pretty old but since I found it through google I think others will, too.
I'm a Fluent / UDF beginner myself, but the following works for me. I verified results with manually using gravity in Fluent GUI. It works perfectly in my vof 2phase case. My UDF has a little bit different purpose but it's easy to adjust. Interpret UDF like always, go to cell zone conditions, select "Source Terms" and add it as x/y/z momentum however you like. Code:
#include "udf.h" DEFINE_SOURCE(gravity_source,c,t,dS,eqn) { real gravity; real source; real flow_time = RP_Get_Real("flow-time"); if (flow_time < 0.1) { gravity = 0.; } else { gravity = 9.81; } /* gravity*cr(ct) is gravity*density = N/m³ = specific weight = F(g) on a unit of volume of a fluid */ source = gravity*C_R(c,t); return source; } |
|
August 21, 2017, 03:02 |
|
#8 | |
New Member
Jayanta Barman
Join Date: Aug 2017
Posts: 1
Rep Power: 0 |
Quote:
|
||
Tags |
body force, gravity, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
UDF to modify gravity via M_gravity[ND_ND] or DEFINE_ADJUST | jpo | Fluent UDF and Scheme Programming | 19 | March 20, 2020 15:34 |
Modify gravity | Tamsu | FLUENT | 0 | April 2, 2013 03:08 |
UDF to modify gravity vector ? | jpo | Fluent UDF and Scheme Programming | 3 | January 24, 2012 10:10 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |