[Nek5000-users] Initialise with random noise
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Fri Jul 18 15:35:45 CDT 2014
JC,
There are several questions raised by your situation.
Personally, I find that I prefer to have the same "random"
number distribution, independent of the number of cores,
so that my initial conditions are repeatable if I run
today on two cores and tomorrow on 4.
So, I usually generate some type of deterministic function
that depends on the input argumets to useric().
A favorite:
subroutine useric(i,j,k,eg)
include 'SIZE'
integer eg
big = 1.e7*eg + 1.e8*i + 1.e9*j + 1.e10*k
rand1 = sin(big)
rand2 = sin(rand1*big)
rand3 = sin(rand2*big)
ux = amp*rand1
uy = amp*rand2
uz = amp*rand3
...etc.
This result is deterministic (and arguably not very
random), but should provide enough noise.
Paul
On Thu, 17 Jul 2014, nek5000-users at lists.mcs.anl.gov wrote:
> Hi again Nek's,
>
> I am working on the simple pipe flow as well, and I have a question
> regarding the initialisation of the perturbation mode. I initialise my
> perturbation with call random_number(vxp) call random_number(vyp) and call
> random_number(vzp) and run the calculation on 4 processors for validation
> and tests purposes. The domain is divided in four partitions in the
> streamwise direction. Unfortunately, the call random_number repoduces four
> times the same random field and as a consequence prescribes a streamwise
> wavenumber which I'd like to get rid of. Any ideas on how to do that?
>
> Regards,
> JC
>
> --
> Jean-Christophe Loiseau
> Homepage <https://sites.google.com/site/loiseaujc/>
>
More information about the Nek5000-users
mailing list