[Nek5000-users] Storing dragy coefficient

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Nov 24 10:18:31 CST 2017


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, [ mailto:nek5000-users at lists.mcs.anl.gov | 
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" < [ mailto:nek5000-users at lists.mcs.anl.gov | nek5000-users at lists.mcs.anl.gov ] > 
À: "nek5000-users" < [ mailto:nek5000-users at lists.mcs.anl.gov | 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 


BQ_BEGIN

On Nov 22, 2017, at 10:49 AM, [ mailto:nek5000-users at lists.mcs.anl.gov | 
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 
[ mailto:Nek5000-users at lists.mcs.anl.gov | Nek5000-users at lists.mcs.anl.gov ] 
[ https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users | https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users ] 





_______________________________________________ 
Nek5000-users mailing list 
[ mailto:Nek5000-users at lists.mcs.anl.gov | Nek5000-users at lists.mcs.anl.gov ] 
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users 
_______________________________________________ 
Nek5000-users mailing list 
[ mailto:Nek5000-users at lists.mcs.anl.gov | Nek5000-users at lists.mcs.anl.gov ] 
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users 

BQ_END



_______________________________________________ 
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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20171124/9a6222b0/attachment-0001.html>


More information about the Nek5000-users mailing list