Skip to content

IboralalpI

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: STL File position shifting #7819
    IboralalpI
    Participant

    Dear Adrian,

    adding get(Min,Max) functions and of course updating with the translate array fixed the issue. STL transition works now.

    Hope it is also useful for the other users.

    I believe you won`t need it but I could also share the updated indicatorF3D.h and indicatorF3D.hh via mail. Would be great if we can have this on the next update.

    Best,
    Berkay

    in reply to: SuperLatticePhysHeatFlux3D Different Results on GPU vs CPU #7817
    IboralalpI
    Participant

    Hi Adrian,

    Thank you for your answer. It works now!

    Just as a hint for the other users, you have to setProcessingContext before and after the steps of setting boundary values when you are updating the values during run-time.

    Best

    in reply to: superLatticeTimeAveraged and AnalyticalFfromSuperF3D #7811
    IboralalpI
    Participant

    Hi Adrian,

    I have my own way of visualisation. This is one of the reasons why I need to write the data somewhere.

    Also, I might have to use the data later to train some NN structures. It would be really great if I could write the data in a format other than the classic .PVD.

    This is what I thought could be useful in order to solve this issue, but It seems to be not working well.

    std::vector<SuperF3D<T,T>*< vectorVelocity;

    if(iT%vtkIter == 0 && iT > 0)
    {
    SuperLatticePhysVelocity3D<T, NSDESCRIPTOR> velocity(NSlattice, converter);
    vectorVelocity.push_back(&velocity)
    }

    After saving all the steps of the velocity, at the last saving step, I am summing all the saved velocities and dividing it by the number of steps. Everything runs smoothly but it doesn’t give the same result as the Time-Averaged functor.

    Sorry I can’t copy and paste my code, because the site sees it as a threat. The rest is basically a for loop and then I use the AnalyticalFfromSuperF3D.

    in reply to: STL File position shifting #7745
    IboralalpI
    Participant

    I am testing it on the examples/laminar/cylinder3d example. So, the base unit of the cylinder3d.stl is set to 0.001. The same error is still there even if I increase the resolution so that the dx is smaller than 0.001.

    After I use the IndicatorTranslate3D<T>, I use the getMin() and getMax() functions in order to check if the Translation worked properly. The print-out of those are both [0,0,0] causing it to give a 0 length error.

    Here it is:
    -> STLreader<T> stlReader(“cylinder3d.stl”, converter.getConversionFactorLength(), 0.001);
    IndicatorLater3D<T> stlReaderShifted(shift, stlReader);

    clout << “stlReaderMin: ” << stlReader.getMin() << std::endl;
    clout << “stlReaderMax: ” << stlReader.getMax() << std::endl;
    clout << “stlReaderShiftedMin: ” << stlReaderShifted.getMin() << std::endl;
    clout << “stlReaderShiftedMax: ” << stlReaderShifted.getMax() << std::endl;

    Console:

    [0.00025 0.00025 0.00025]
    [2.49925 0.40925 0.40925]
    [0 0 0]
    [0 0 0]

    in reply to: STL File position shifting #7719
    IboralalpI
    Participant

    Dear Adrian, sorry for the late response, my answer got blocked quite a few times.

    After your response, I had a small trial with the IndicatorTranslate3D function inside the cylinder3d example. However, I couldn’t get it to work properly.

    std::array<T,3> shift {0.5, 0., 0.};
    STLreader<T>stlReader(“cylinder3d.stl”, converter.getConversionFactorLength(), 0.001);
    IndicatorTranslate3D<T>stlReaderShifted(shift,stlReader);
    IndicatorLayer3D<T>extendedDomain(stlReaderShifted,converter.getConversionFactorLength());

    This gives the …/IndicatorF3D.hh:624 -> Assertion ‘_xLength>0 && _yLength>0 && _zLength>0’ failed.
    Aborted

    I tried to use the IndicatorTranslate3D inside the prepare geometry function, in some other parts of the code and with different IndicatorF3Ds but nothing worked. The rest of the code is just like the cylinder3d example. Am I missing something obvious?

    Thank you in advance for your support.
    Best,
    Berkay

Viewing 5 posts - 1 through 5 (of 5 total)