blueCFD / lagrangianExtraFunctionObjects

Function object library re-adapted from OpenFOAM 5, to write to disk in the old positions file format.
GNU General Public License v3.0
19 stars 3 forks source link

cannot used in parallel model #1

Closed graceyangfan closed 2 years ago

graceyangfan commented 5 years ago

when I used reconstructPar,no old version format positions are created

wyldckat commented 5 years ago
  1. Since it's a function object, you can run the solver in parallel with the -postProcess option.

  2. Then in ParaView, use the Decomposed Case option in Case Type.

Alternatively, you can run the solver in serial mode with the -postProcess option, after reconstruction.

graceyangfan commented 5 years ago

thanks a lot,I will have a try

liuxiang858 commented 4 years ago

when I use it , I can't find position.orig in kinematicCloud. Why?thanks for answering!!

wyldckat commented 4 years ago

@liuxiang858:

  1. I need more details about which steps and commands you have followed exactly.

  2. And in which sub-folder you are looking for that file, namely where is the kinematicCloud folder you are looking at?

liuxiang858 commented 4 years ago

First thank you for answering my question! I used bluecfd openfoam5.x. My steps: 1、I download the .zip from here , then put it into OpenFoam5.x folder. 2、wmake . But return to me a mistake named 'can't find the PstreamReduceops.H'(maybe named it,I can't remember it clearly),then I look for the file in all the folder of OpenFoam5.x,but failed,only find 'PstreamReduceops.T.H', then I changed 'PstreamReduceops.H' into 'PstreamReduceops.T.H' in the .C file which I download from you.After that I wmake succeed. 3、I copied the functions you provided into 'system/controlDict' which located in my example.Then I find it can be loaded from terminal. But nothing changed in the 0.001\lagrangian\kinematicCloud file. So thank you again sincerely.Please help me!!!

wyldckat commented 4 years ago

@liuxiang858 From your description, I'm guessing that you followed the incorrect installation instructions. You should follow the instructions given here: https://github.com/blueCFD/lagrangianExtraFunctionObjects/tree/blueCFD-Core-2017#lagrangianextrafunctionobjects

I've updated them, so that it is clearer how to download, build and use it. Please follow these instructions, to ensure things work as intended.

liuxiang858 commented 4 years ago

thank you very much.But I can't find any differences between old version and the new one , so I can't under which step of mine has mistakes , I can't find the mistake of mine , in other words , can you tell me which step above has mistake??? Also , I repeat it follow the new one nothing changed. Thank you for answering! Looking forward to your reply!!!

wyldckat commented 4 years ago

@liuxiang858: From what I can understand from your description:

Your step 2 is indicating "can't find the PstreamReduceops.H", which should not have happened. In the section "How to get+build lagrangianExtraFunctionObjects": https://github.com/blueCFD/lagrangianExtraFunctionObjects/tree/blueCFD-Core-2017#how-to-getbuild-lagrangianextrafunctionobjects - you can now see the output that is meant to appear when the build is completed.

Then in step 3, it's clear what you did exactly, after you placed the function in the file system/controlDict. The idea is that you should use this function in either one of two possible ways:

  1. Either you need this function to already be in the file system/controlDict, before you run the solver.

  2. Or if you already ran the solver, you need to use the -postProcess option with the solver you used. For example, if you used sprayFoam to simulate, you then need to run:

    sprayFoam -postProcess
liuxiang858 commented 4 years ago

I am so sorry, because I do all the things you have told ,it didn't work. First , you said in the step2 it shouldn't happened ,yes,now it can wmake succesed ,it wouldn't happen anyway. Second , I exactly use the first way you mentioned 'Either you need this function to already be in the file system/controlDict, before you run the solver.',but unfortunately nothing changed. So can it did well in your computer?I will show you some photos.Please help me!I really need it. Thank you sinerely.What't more,Where are you come from? I am a Chinese student.Looking forward to you with pleasure!

(removed old text that came with the email answer.)

wyldckat commented 4 years ago

I'm located in Portugal, so there is a large time zone difference, which means that if you do not provide all of the necessary information ahead of time, it will continue to take days until we can figure out the solution :(

I don't know which solver you are using and which tutorial case I can use to demonstrate to you how this works.

liuxiang858 commented 4 years ago

Thank you very much.Do you have WeChat just like facebook , because we have a internet wall between china and abord ,I can't use facebook to talk with you. The solver is 'MPPICFoam' , the case is located on 'D:\blue CFD\blueCFD-Core-2017\ofuser-of5\run\injectionChannel' , the file you provided to me located on 'OpenFOAM-5.x\lagrangianExtraFunctionObjects-blueCFD-Core-2017'.I am waitting for you.

(removed old text that came with the email answer.)

wyldckat commented 4 years ago

I don't have free time to provide support in real time via chat :(

Furthermore, if you have urgency in seeing the results, you should have been able to export the data to VTK by running:

foamToVTK

I'm currently writing a step-by-step instructions section on the README files for the tutorial case lagrangian/MPPICFoam/column. I hope I will finish writing it in about 30 minutes.

wyldckat commented 4 years ago

@liuxiang858 I have now found that the problem was that MPPICFoam uses a different cloud class, which is why it wasn't working properly.

So, please follow the installation instructions again, as given here: https://github.com/blueCFD/lagrangianExtraFunctionObjects/tree/blueCFD-Core-2017#how-to-getbuild-lagrangianextrafunctionobjects

Then if you still are having difficulties using this function object, please see the new sections that demonstrate a practical example: https://github.com/blueCFD/lagrangianExtraFunctionObjects/tree/blueCFD-Core-2017#practical-example

liuxiang858 commented 4 years ago

Thank you very much.I do this successful just now!I can't describe how excited I am right now! So please accept my respect now!!! Thank you all the way!Please forgive me for disturbing you so much.God bless you!

(removed old text that came with the email answer.)

wyldckat commented 4 years ago

You're welcome and thank you for reporting this issue. Please, next time provide more details in your first question. The critical detail here was knowing which solver was being used.

UOSilos commented 3 years ago

Hi, I am facing the same problem.

I tried to use the function with coalChemistryFoam (OF8), so maybe this coalCloud class is not recognised in the script (only MPPIC, colliding, spray and reacting multiphase). But actually this latter is included to form the coalCloud.

In my case positions.orig are properly written in processorx/lagrangian/coalCloud1 but when reconstructing they do not reconstruct.

Trying to reconstruct and then running postProcess -dict system/positionConvertDict gives me this error:

Executing functionObjects

--> FOAM FATAL ERROR: 

    request for kinematicCloud coalCloud1 from objectRegistry region0 failed
    available objects of type kinematicCloud are
0()

    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::kinematicCloud]
    in file /opt/openfoam8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211.

FOAM aborting
wyldckat commented 3 years ago

@UOSilos Sorry for the delay in answering back to you, but on the second comment at the top is the mention that the solver should be used instead, for example:

coalChemistryFoam -postProcess  -dict system/positionConvertDict
UOSilos commented 3 years ago

@UOSilos Sorry for the delay in answering back to you, but on the second comment at the top is the mention that the solver should be used instead, for example:

coalChemistryFoam -postProcess  -dict system/positionConvertDict

Thanks a lot @wyldckat , I wrote because I had already tried this but it did not work, this is the output:

--> FOAM FATAL ERROR: 

    request for kinematicCloud coalCloud1 from objectRegistry region0 failed
    available objects of type kinematicCloud are
0()

    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::kinematicCloud]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::kinematicCloud const& Foam::objectRegistry::lookupObject<Foam::kinematicCloud>(Foam::word const&) const at ??:?
#3  Foam::functionObjects::writeCloudOldStyle::write() at ??:?
#4  Foam::functionObjects::timeControl::write() at ??:?
#5  Foam::functionObjectList::execute() at ??:?
#6  ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/coalChemistryFoam"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/coalChemistryFoam"
UOSilos commented 3 years ago

@liuxiang858 I have now found that the problem was that MPPICFoam uses a different cloud class, which is why it wasn't working properly.

@wyldckat Couldn't be that coalCloud class is not recognized in wirteCloudOldStyle.C ??? I only see basicKinematicCollidingCloud, basicKinematicMPPICCloud, basicSprayCloud and basicReactingMultiphaseCloud.

wyldckat commented 3 years ago

@UOSilos Just to be certain, which tutorial case can I use to test this?

UOSilos commented 3 years ago

@wyldckat simplifiedSiwek tutorial

wyldckat commented 2 years ago

@UOSilos My apologies for the late reply... but I only managed to look into this today. It looks like this was/is a bug in coalChemistryFoam, namely the -postProcess option unfortunately does not ensure that the clouds will be loaded for post-processing, resulting in the statement from the solver that there are no clouds available.

The simplest way to get it to run the function object, is when running the solver itself. Alternatively, another function object can be used to load the cloud... either with swak4Foam or with a custom function object.

I do know that OpenFOAM 8 (and blueCFD-Core 2020) don't have this ability yet. OpenFOAM 9 switched to using reactingFoam as a general implementation, but I haven't tested it yet. I'll add a note to the README file.