Skip to content

steed188

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 36 total)
  • Author
    Posts
  • in reply to: About ConvectionBC #2659
    steed188
    Participant

    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
    steed188

    steed188
    Participant

    Yeah. I wish i will get my professor’s permission for that. smile:)

    in reply to: About ConvectionBC #2656
    steed188
    Participant

    I just use defineRhoU to define the velocity(0,0,0) and Rho (1) on convection bc. Is it right?

    steed188
    Participant

    Dear 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
    steed188

    in reply to: About ConvectionBC #2652
    steed188
    Participant

    Dear 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
    steed188

    steed188
    Participant

    Dear 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.

    steed188
    Participant

    Dear 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

    in reply to: Operate the whole vector field #2639
    steed188
    Participant

    Dear 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,

    in reply to: Operate the whole vector field #2636
    steed188
    Participant

    Dear 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 AnalyticalF

    It 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

    in reply to: 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

    in reply to: Operate the whole vector field #2632
    steed188
    Participant

    Dear 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
    steed188

    in reply to: Calculate the time average velocity field #2630
    steed188
    Participant

    Dear 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.

    in reply to: Value on the edge of Cuboids is zero #2629
    steed188
    Participant

    I 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?

    in reply to: Operate the whole vector field #2628
    steed188
    Participant

    Dear Albert,
    After I used SuperLatticePhysVelocity3D to get the whole field vectors, I wanted to do some operation to it. For example

    SuperLatticePhysVelocity3D<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
    steed188

    in reply to: MPI run — pvd file fault #2623
    steed188
    Participant

    Hi 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

Viewing 15 posts - 16 through 30 (of 36 total)