|
[Sponsors] |
July 12, 2001, 05:58 |
Const. momentum surce
|
#1 |
Guest
Posts: n/a
|
I want to add an additional source of momentum. This source is a function of the position only (S=S(x,y,z)). I have S tabulated in a large ASCII table containing x,y,z,Sx,Sy,Sz. The way I wanted to use the table was by use of the user subroutine, sormom.f. This subroutine will then have to load the table-file and find the right values for Sx(x,y,z), Sy(x,y,z) and Sz(x,y,z). This does work but is very time consuming caused by the size of the file that has to be loaded for every single point in the domain during every iteration.
Question: Is it possible to load this table just once and then save it in the memory as it does not very with any values solved for? Regards TUU |
|
July 12, 2001, 08:55 |
Re: Const. momentum surce
|
#2 |
Guest
Posts: n/a
|
Hi
it is just standard Fortran, declare the variables you are using within a COMMON block or declare them with the SAVE function: this means that the next time you visit the routine they will still be there. You now need an extra flag that you set once you have visited and initialise to zero before you go there. The general structure will look like this: COMMON /mycom/ thex,they,thez,thesx,thesy,thesz,ivisit DATA ivisit/0/ if(ivisit.eq.0) then read in data ivisit=1 endif calculate sormom values return end Philip |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Unsteady surce term" | ftsr | FLUENT | 0 | October 28, 2005 23:21 |
Surce Terms fluent bad results | Mihai | FLUENT | 2 | May 11, 2005 08:36 |
Momentum | Jackie | FLUENT | 5 | February 24, 2005 05:34 |
regarding momentum | Deadly | FLUENT | 0 | August 15, 2002 03:40 |