[Nek5000-users] previous value of drag coefficient

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Nov 22 04:23:14 CST 2017


just declare an array "lift(nabstep)", and at each step you push the 
content up by one index:

do i=nabstep-1,-1,1
   lift(i+1) = lift(i)
end do
lift(1) = current_lift

something like that.

philipp


On 2017-11-22 11:18, nek5000-users at lists.mcs.anl.gov wrote:
> Thank you Philip. I am sorry I just started to use NEK5000 and in Fortran too. I could not find an example of the concept of lag array. I know its a silly question. But could you please help me how to initialize such an array.
> 
> Thanks again
> Sijo GEORGE
> 
> ----- Mail original -----
> De: "nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> À: "nek5000-users" <nek5000-users at lists.mcs.anl.gov>
> Envoyé: Mercredi 22 Novembre 2017 11:05:45
> Objet: Re: [Nek5000-users] previous value of drag coefficient
> 
> Hi,
> I suggest to use lag arrays as done for the BDF scheme, that is to have an array of size #multisteps and at each new time step to copy the old RHS (as you do AB) one step backwards.
> This is then somewhat consistent with Nek. Just be careful during the startup.
> Hth, Philipp
> 
> On November 22, 2017 10:31:11 AM GMT+01:00, nek5000-users at lists.mcs.anl.gov wrote:
>> Hi Neks,
>>
>> Since I am trying to implement Adams bashforth scheme on my FSI problem
>> (for equation of motion), I would like to pass the lift coefficients of
>> the current timestep and the just previous time step to the function
>> where I implemented the Adams Bashforth module. But its seems a bit
>> difficult to fetch the just previous value of dragy value since it
>> calls a new value at every time step. I simply tried a swapping method.
>> But it gets zero value. Could you please tell me whether is there any
>> way to fetch the just previous value of a variable (from an array or
>> something?)
>>
>>
>> Thanks regards
>>
>> Sijo GEORGE
> 


More information about the Nek5000-users mailing list