|
[Sponsors] |
Modifying gravity vector and MRFomega a run time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 10, 2007, 14:17 |
Hello,
I am trying to do tw
|
#1 |
Member
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 17 |
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 |
|
December 12, 2007, 07:45 |
anyone?
Please
|
#2 |
Member
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 17 |
anyone?
Please |
|
December 12, 2007, 19:42 |
Hello, nicolas.
I tried to
|
#3 |
New Member
Giro
Join Date: Mar 2009
Posts: 13
Rep Power: 17 |
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 |
|
December 22, 2007, 11:41 |
Hi Nicolas
A very nice eve
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
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 |
|
|
|
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 |