Skip to content

Retrieving Data

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7168
    Jijo
    Participant

    Hello everyone.

    I want to know how can I extract the temperature at a certain location and save in an array to use it inside the code? Can I do the same thing for the velocity of the particle?

    Regards,

    #7169
    Jijo
    Participant

    Hello again.

    I guess I did not explain my question clearly. Can I access the temperature at certain location in the (getResults) function?

    I want to obtain the temperature around a particle and store it in the same dkt2d data file that the particle velocity and location is stored in. Why the following code does not work

    auto particleA = particleSystem.get( 0 );
    #ifdef WriteGnuPlot
    if (iT % converter.getLatticeTime(iTwrite) == 0) {
    if (singleton::mpi().getRank() == 0) {

    std::ofstream myfile;
    myfile.open (gnuplotFilename.c_str(), std::ios::app);
    T p1PosY = particleA.getField<GENERAL,POSITION>()[1];
    T p1PosX = particleA.getField<GENERAL,POSITION>()[0];
    T p1VelocityY= particleA.getField<MOBILITY,VELOCITY>()[1];
    T p1VelocityX = particleA.getField<MOBILITY,VELOCITY>()[0];
    T radiusP = 0.001;
    T Temp_Value[1];
    ADlattice.get(p1PosX + radiusP, p1PosY + radiusP).computeRho(Temp_Value);

    Your reply is appreciated

    #7183
    FBukreev
    Keymaster

    Hello Jijo,

    you can look into the code of lattice functors. First you need to get the right blockLattice number and then compute density at the point with its lattice coordinates.

    Greetings
    Fedor

    #7189
    Henderson_C
    Participant

    Dear FBukreev,

    Can you explain more specifically.

    Regards,

    • This reply was modified 1 year, 3 months ago by Henderson_C. Reason: Wrong spelling
    #7191
    Henderson_C
    Participant

    Dear FBukreev,

    Alright I got it from another forum.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.