steed188
Forum Replies Created
-
AuthorPosts
-
steed188Participant
I’ve no idea what the uAv value means. There seems no comments about uAv in the source Code.
How should I get uAv value? Do I just create an new empty pointer?Best
steed188July 11, 2017 at 5:47 pm in reply to: How to use a SuperIdentity3D pointer to pass between two time step #2657steed188ParticipantYeah. I wish i will get my professor’s permission for that. smile:)
steed188ParticipantI just use defineRhoU to define the velocity(0,0,0) and Rho (1) on convection bc. Is it right?
July 11, 2017 at 5:35 pm in reply to: How to use a SuperIdentity3D pointer to pass between two time step #2653steed188ParticipantDear mathias,
Sorry for so late.
Do you mean that my code is correct with the usage of SuperData3D and SuperDataF3D though it was not efficiency?
That is weird that it didnt work.Would you like to share some idea for more efficiency terms?
your best
steed188steed188ParticipantDear mathias,
Sorry for so late.
Here’s a picture that I tried the convection and pressure boundary.[img]http://photry-production-virginia.s3.amazonaws.com/1288/1538/63365/large.jpeg?AWSAccessKeyId=AKIAIFWXMUQTJZO2WGXA&Expires=1499790408&Signature=4MGbkW0NFciumBPq2%2B8lyS5QQ90%3D[/img]
[img]http://photry-production-virginia.s3.amazonaws.com/1288/1538/63366/large.jpeg?AWSAccessKeyId=AKIAIFWXMUQTJZO2WGXA&Expires=1499790409&Signature=SASQFxbQCNSruGTwEErgo9usEJA%3D[/img]
You see that when I used pressure boundary, there was velocity there that the fluid went out.
While I used convection boundary, there is no velocity to go out . So that the fluid always moved in the filed and no outlet.That’s weird because I thought that the convection boundary should have same effect with pressure boundary in my case.
By the way, I’m working on some High Reynolds fluid that the kinetic viscosity gets 10e5. Under this kind of kinetic viscosity, the simulation is always diverged if using pressure bc. But the convection bc seems dose not work as I showed upper. Do you have some idea that how can I work with pressure bc under so high reynolds fluid?
best
steed188June 20, 2017 at 7:41 am in reply to: How to use a SuperIdentity3D pointer to pass between two time step #2647steed188ParticipantDear mathias,
Yeah, I’ve tried SuperData3D. But it seems I did wrong.
For example, I defined a SuperData3D named “Store_VecData” in the main function, then assume that we accumulate the velocity to it every step and then write it to VTK files.
I did it like below.Code:void main(){
….
//define a SuperData
SuperData3D<T,T> Store_VecData ( cuboidGeometry, loadBalancer, 2, 3 );
….
getResults(…,Store_VecData,…)
}void getResults(…,SuperData3D<T,T>& Store_VecData,…){
SuperLatticePhysVelocity3D<T,DESCRIPTOR>velocity_lattice( sLattice, converter );
SuperIdentity3D<double,double> phyVelocity(velocity_lattice);// if iT is 1 then assign the initial value to Store_VecData;
if (iT == 1 ){
SuperData3D <T,T> temp_Data (phyVelocity);
Store_VecData = temp_Data;
}//Othewise I want extract SuperF from SuperData and add
// this time ‘s value, store it to SuperData again.
if (iT > 1){
SuperDataF3D <T,T> last_Data ( Store_VecData );
SuperData3D <T,T> this_Data ( last_Data + phyVelocity );
Store_VecData = this_Data;
}//write SuperData to VTKfiles
SuperDataF3D <T,T> toVTK ( Store_VecData );
vtmWriterTS.write( toVTK ,iT );
}Well. I didn’t work. Always Segmentation fault. 😀
Would you like point out the fault?By the way, thank you for noticing that the spring school. I’ll discuss it with my prof.
steed188.
June 19, 2017 at 3:55 pm in reply to: How to use a SuperIdentity3D pointer to pass between two time step #2645steed188ParticipantDear mathias,
Thank you for your reply.
Would you mind applying some examples that showing how to use superData class to store data?
Thank you very much。steed188
steed188ParticipantDear mathias,
Yeah, I’m discussing with my professor to attend next years’s spring school these days for I have a lot of things to learn and discuss.But before that , would you mind helping me that how to assign one AnalyticalF or SuperLatticeF with another?
for example,SuperIdentity3D<T,T> * sFunctor1 ;
SuperIdentity3D<T,T> sFunctor2(……) ;How should I operate that can meke sFunctor1=sFunctor2?
Thank you.
with best wishes,
steed188ParticipantDear albert.mink,
Thank you for your example that I learned much from it. But I have still some problems.1. how can I assign a AnalyticalF with another? I did like below, but it went wrong.
Code:AnalyticalIdentity3D<T,T> * aMeanVelocity; //define an empty AnalyticalF
AnalyticalIdentity3D<T,T> Calc_Temp1( ……);
AnalyticalIdentity3D<T,T> Calc_Temp2( ……);
aMeanVelocity = new AnalyticPlus3D<T,T>( Calc_Temp1 , Calc_Temp2); //assign the AnalyticalFIt seems that I could not simply assign it using AnalyticalF_A=AnalyticalF_B
2. As I calculated a new kind of velocity, how can I write it to the same VTK file that the normal velocity is also written. Because they have the same variation name in VTK files causing error.
I did like below.Code:SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity( sLattice, converter ); //ordinary velocity like other cases
SuperLatticeFfromAnalyticalF3D<T,DESCRIPTOR> MeanVel( aMeanVelocity,sLattice,superGeometry ); //new kind of mean velocity calculated from AnalyticalF
vtmWriter.addFunctor( velocity ); //write this time’s instantaneous velocity to VTK
vtmWriter.addFunctor( MeanVel ); //write mean velocity to VTK
vtmWriter.write( iT );It Seems wrong? how can I write two velocity into one VTK file ? Because they own the same name when written to VTK.
Thank you
steed188
steed188ParticipantDear 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
steed188ParticipantDear Albert,
Thank you a lot for keeping going my problems.I’ve tried the AnalticalF functors. I do not use the L2 norm velocities. Adversely, I tried to operate with the x,y,z components. I tried like below:
//
SuperLatticePhysVelocity3D<T, DESCRIPTOR> Velocity1( sLattice1, converter );
SuperLatticePhysVelocity3D<T, DESCRIPTOR> Velocity2( sLattice2, converter );AnalyticalFfromSuperF3D<T> AnalVel1( Velocity1, true, 1 );
AnalyticalFfromSuperF3D<T> AnalVel2( Velocity2, true, 1 );
AnalyticalConst3D<T,T> Number1( T( 1.- 1./5. ) );
AnalyticalConst3D<T,T> Number2( T( 1. / 5.) );AnalyticalIdentity3D<T,T> Calc_Temp1( AnalVel1 * Number1);
AnalyticalIdentity3D<T,T> Calc_Temp2( AnalVel2 * Number1);
AnalyticPlus3D<T,T> NewVel( Calc_Temp1 , Calc_Temp2);SuperLatticeFfromAnalyticalF3D< T, DESCRIPTOR> NewVelToLattice(NewVel, lattice3);
SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity( lattice3, converter );
//
I hope I can create a new velocity field by doing some algebraic calulation with two velocities from two lattice by x,y,z components separately and store it to new lattice3 . But AnalyticalF didn’t works. There are no velocity values in lattice3.
In addition, as you mentioned that “transform it first to an analytical functor and then apply the algebraic operations. Afterwards transform the functor back to a lattice functor” so that I can write it with VTK. Do I have to translate a analytical functor into lattice before I write it to VTK? Because I may have some field results calcuated by analytical functors and then write to VTK files. If that , I need a lattice for every analytical result? That will be a lot of lattices. lol
Thank you again for your patience.
yours sincerely
steed188steed188ParticipantDear Marc,
I’s now trying to make the time average velocity field function. Do you have interest to work together?
If you are intersting in it. You can E-mail steed188@gmail.com me
Best steed188.steed188ParticipantI did it like this:
for ( int iC = 0; iC < TSlattice.getLoadBalancer().size(); iC++ ) {
int nx = sLattice.getBlockLattice( iC ).getNx();
int ny = sLattice.getBlockLattice( iC ).getNy();
int nz = sLattice.getBlockLattice( iC ).getNz();for ( int iX = 0; iX < nx; ++iX ) {
for ( int iY = 0; iY < ny; ++iY ) {
for ( int iZ = 0; iZ < nz; ++iZ ) {
…// Do some operation to every value of Nx,Ny,Nz of TSlattice according to value of slattice;}
}
}
}Then ,I tried to write it to VTK files.
SuperLatticePhysVelocity3D<T, DESCRIPTOR> sumVel( TSlattice, converter );
vtmWriterTS.addFunctor( sumVel );
vtmWriterTS.write( iT );Between this two steps, should I take any operations to combine every Cuiods’ value together?
steed188ParticipantDear Albert,
After I used SuperLatticePhysVelocity3D to get the whole field vectors, I wanted to do some operation to it. For exampleSuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity( sLattice, converter );
velocity = velocity / 2;and it went wrong. I thought that the velocity is the data structure that created by SuperLatticePhysVelocity3D to store whole field vectors. Am I wrong?
So how should I define a structure to store data after using SuperLatticePhysVelocity3D to get it?Thank you so much.
yours sincerely
steed188steed188ParticipantHi Albert,
I got the point. My OpenMPI’s version was 1.6.3. I changed it to version 1.10.0. And it works.
I don’t know why.
Thank you very much.
Yours steed188 -
AuthorPosts