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

Search Results

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

Showing results 1 to 7 of 7
Search took 0.00 seconds.
Search: Posts Made By: alberto
Forum: OpenFOAM Programming & Development February 8, 2010, 13:46
Replies: 40
Views: 17,659
Posted By alberto
Hi, I agree with the suggestion of using an...

Hi,

I agree with the suggestion of using an interpolationTable. You can take a look at this:

http://foam.sourceforge.net/doc/Doxygen/html/classFoam_1_1interpolationTable.html#_details

and...
Forum: OpenFOAM Programming & Development February 8, 2010, 13:04
Replies: 40
Views: 17,659
Posted By alberto
Thousands of values as a function of time, or...

Thousands of values as a function of time, or does your "gravity vector" change as a function of the position too?

Best,
Alberto
Forum: OpenFOAM Programming & Development January 23, 2010, 18:09
Replies: 40
Views: 17,659
Posted By alberto
Good! And you found part of the answer yourself,...

Good! And you found part of the answer yourself, since I misled you with timeName(). Sorry about that :(

Best,
Forum: OpenFOAM Programming & Development January 23, 2010, 14:43
Replies: 40
Views: 17,659
Posted By alberto
The problem is in how you set the dimensions....

The problem is in how you set the dimensions. Replace

g0=9.81*sin(runTime.timeName()*pi/4.0)*vector(1,0,0)-9.81*cos(runTime.timeName()t*pi/4.0)*vector(0,0,1);

dimensionedVector...
Forum: OpenFOAM Programming & Development January 18, 2010, 14:43
Replies: 40
Views: 17,659
Posted By alberto
Without the error message, it is a bit hard :-) ...

Without the error message, it is a bit hard :-)

However, here

g=9.81*sin(pi/4*runTime)*vector(1,0,0)-9.81*cos(pi/4*runTime)*vector(0,0,1);

you use runTime in the wrong way. It is a Time...
Forum: OpenFOAM Programming & Development January 18, 2010, 14:28
Replies: 40
Views: 17,659
Posted By alberto
Well, it might not be the most elegant way, but a...

Well, it might not be the most elegant way, but a quick one could be to write a function that returns the gravity value checking the time range.

In pseudo-code

if (t <= 0.1)
g = (0.1 0.1 1)...
Forum: OpenFOAM Programming & Development January 17, 2010, 01:48
Replies: 40
Views: 17,659
Posted By alberto
Hi, look at how the gravity is implemented...

Hi,

look at how the gravity is implemented in interFoam, by means of its contribution to the flux.

In the momentum predictor, if solved, the gravity is not included in the matrix but added on...
Showing results 1 to 7 of 7

 
Forum Jump

All times are GMT -4. The time now is 08:07.