Skip to content

Re: Operate the whole vector field

#2634
steed188
Participant

Dear albert.min-k,

Thank you for your focus.
I apologized for my poor English. 🙁

First, do you mean that I should modify the code like below as you mentioned the “dimension”


AnalyticalFfromSuperF3D<T> AnalVel1( Velocity1, true, 1 );
AnalyticalConst3D<T,T> Number1( T( 1.- 1./5. ), T ( 1.- 1./5. ), T ( 1.- 1./5. ));
AnalyticalIdentity3D<T,T> Calc_Temp1( AnalVel1 * Number1);



Secondly, I mean that after I get a new velocity named NewVel by


AnalyticalIdentity3D<T,T> Calc_Temp1( AnalVel1 * Number1);
AnalyticalIdentity3D<T,T> Calc_Temp2( AnalVel2 * Number2);
AnalyticPlus3D<T, T> NewVel( Calc_Temp1 , Calc_Temp2);



Did I do get a new kind of velocity named “NewVel” of the whole field?
Then how should I do to put back it to the lattice so that I can write it to VTK? It seems that I can not write “NewVel” to VTK files just by doing as belows


SuperLatticeFfromAnalyticalF3D< T, DESCRIPTOR> NewVelToLattice(NewVel, lattice3);
SuperLatticePhysVelocity3D<T, DESCRIPTOR> New_Velocity( lattice3, converter );
vtmWriter.addFunctor( New_Velocity );
……


Would you mind giving an example or some codes that can teach me put it back to lattice and write it to VTK? As I could not find a similar example from the official tutorial.

Thirdly, what I mean by several lattices is like this:
I’m working on turbulence, in this field, I need to calculate several kinds of velocity indexes to continue my research, for example time average velocity, Reynolds stress velocity and so on. They are different kinds of velocities that calculated based on instantaneous velocity. After I calculated them by AnalyticalF I need to store them every time step and write to VTK. Do I need to store them in different lattice so that they won’t be covered by each other?
If I calculate them during post processing, I have to store every time steps‘ data, that would be a huge data to process. So I want to calculate them during every collisionAndStream period and just store the very time step that I need.

Again, thank you for your patience.

Yours steed188