CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Modifying gravity vector and MRFomega a run time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2007, 14:17
Default Hello, I am trying to do tw
  #1
Member
 
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 17
nico765 is on a distinguished road
Hello,

I am trying to do two things at run time:
*modify the gravity: g is a dimensionedVector.
something like that: g=vector(Foam::cos(alfa*M_PI/180.0),Foam::sin(alfa*M_PI/180.0),0.0):sin(alfa*M_P I/180.0),0.0);
gives me a problem of dimensions at run time.

*modify omega at run time
which is defined in OpenFOAM-1.4.1/src/finiteVolume/cfdTools/general/MRF/MRFZone.H; i cannot manage to access this omega at run time.

Regards,

Nicolas
nico765 is offline   Reply With Quote

Old   December 12, 2007, 07:45
Default anyone? Please
  #2
Member
 
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 17
nico765 is on a distinguished road
anyone?

Please
nico765 is offline   Reply With Quote

Old   December 12, 2007, 19:42
Default Hello, nicolas. I tried to
  #3
New Member
 
Giro
Join Date: Mar 2009
Posts: 13
Rep Power: 17
girogirozakk is on a distinguished road
Hello, nicolas.

I tried to modify the gravity.
And I was up to my URL the sample( sorry, Japanease lang... ).
http://members.jcom.home.ne.jp/issa_.../sloshing.html

If I made misstake , please teach me.


modify omega
Sorry,I never try.


Giro
girogirozakk is offline   Reply With Quote

Old   December 22, 2007, 11:41
Default Hi Nicolas A very nice eve
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Nicolas

A very nice evening to you


Let me try to answer the second question

-------------------------

*modify omega at run time

------------------------
As far as my knowledge goes omega is private variable of the class MRFZone. To get access to it you have to add a member function, which returns its value, to the interface.

A inline function named getOmega can be added to the MRFZone.H which returns its value and then whenever you need it you can call it.

Example:

MRFZone myzone(mesh);

and then at runtime you can access it with

myzone.getOmega();

Please take notice of the fact that the class has a scalar "omega" and vector "Omega". Pick your choice :-).

Hope that helps you.

Kind Regards
Jaswinder
jaswi is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gravity function of time arapar FLUENT 0 March 8, 2008 14:49
Gravity Vector in CFX S. CFX 2 May 8, 2007 14:28
changing gravity vector direction using UDF Nico FLUENT 0 September 7, 2006 13:00
Use UDFs to change gravity vector in part ofdomain Nico FLUENT 0 August 29, 2006 07:15
variation of gravity with time rajani FLUENT 0 February 16, 2005 03:45


All times are GMT -4. The time now is 21:43.