[Nek5000-users] Storing dragy coefficient
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Fri Nov 24 12:20:15 CST 2017
Hi
If I understand well, you should just do it as I wrote earlier:
just declare an array "lift(nabstep)", and at each step you push the
content up by one index:
real, parameter :: nabstep=4
real cd(nabstep)
save cd
....
do i=nabstep-1,-1,1
cd(i+1) = cd(i)
end do
cd(1) = new_cd
or something like that.
philipp
On 2017-11-24 17:18, nek5000-users at lists.mcs.anl.gov wrote:
> Hi,
>
> It worked. And now I just have one more question. I store the drag
> coefficient in each time step
> lets say
>
> real dragycoeff(NSTEP)
> save dragycoeff
>
> dragycoeff(istep) = dragy(1)
>
> The reason why I store these values : I would like to use them for adams
> bashforth scheme. (Since I am working on FSI problem and to solve
> equation of motion) so i may need the previous for 4 values maximum to
> compute the displacement and velocity values for the next time step.
>
> So my question is, If I have a very large time steps (lets say 500000)
> will it be efficient? I am also thingking another way like dynamic
> memory allocation. Since I just need the previous 4 values at each time
> step, I dont have to store all the drag coefficient for all the time
> steps. So is there any way in NEK5000 to store the just 4 previous
> values and update these values at every time step. So that i can
> decalare a varibale of just siwe of 4 (lets say : real dragycoeff(4) ).
> Or Can I make any function for that?
>
> Thanks in advance
>
> SIjo GEORGE
>
> ------------------------------------------------------------------------
> *De: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> *À: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> *Envoyé: *Mercredi 22 Novembre 2017 17:22:30
> *Objet: *Re: [Nek5000-users] Storing dragy coefficient
>
> Thanks Marco I give a try, I am trying to implement FSI with adams
> bashforth method. RK4 scheme is validated. Now I am doing the stability
> study (comparing adams and RK4). So thanks and please do keep in touch.
>
> Sijo
> ------------------------------------------------------------------------
> *De: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> *À: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> *Envoyé: *Mercredi 22 Novembre 2017 17:18:24
> *Objet: *Re: [Nek5000-users] Storing dragy coefficient
>
> I think it should do the trick.
>
> If you want to use the values in a different subroutine, you must use
> common block. If the values are used in the same subroutine as they are
> stored, then save data should be sufficient.
>
> Marco
>
>
> On Nov 22, 2017, at 11:10 AM, nek5000-users at lists.mcs.anl.gov
> <mailto:nek5000-users at lists.mcs.anl.gov> wrote:
>
> Thank you marco.
>
> So you mean if my problem is for 100 time steps and if i declare a
> variable like below
>
> real dum(100)
> save dum
>
> and if i write
>
> dum(istep)= dragy(1) # I have one object
>
> I could store all the dragy coefficient into this array permenently?
>
> Because I just want to use the previous values that means
> (dum(istep-1)) in some other functions.
>
>
> Thanks with regards
>
>
> Sijo GEORGE
>
>
> ------------------------------------------------------------------------
> *De: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov
> <mailto:nek5000-users at lists.mcs.anl.gov>>
> *À: *"nek5000-users" <nek5000-users at lists.mcs.anl.gov
> <mailto:nek5000-users at lists.mcs.anl.gov>>
> *Envoyé: *Mercredi 22 Novembre 2017 16:58:15
> *Objet: *Re: [Nek5000-users] Storing dragy coefficient
>
> if I correctly understand your problem, you will need to look into
> common block or save data that are Fortran capabilities.
>
> Marco
>
> On Nov 22, 2017, at 10:49 AM, nek5000-users at lists.mcs.anl.gov
> <mailto:nek5000-users at lists.mcs.anl.gov> wrote:
>
> Hi,
>
> I was working on storing dragy coefficient on an array. But its
> not getting permanently stored in the varibale after the next
> time step. That means I could not access the previous stored
> value from the array. Is there any way to store and access dragy
> of different time steps?
>
> Thanks
>
> with regards
>
> Sijo GEORGE
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> <mailto:Nek5000-users at lists.mcs.anl.gov>
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov>
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov>
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
More information about the Nek5000-users
mailing list