CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Adaptive Local Mesh Refinement (https://www.cfd-online.com/Forums/openfoam-solving/94493-adaptive-local-mesh-refinement.html)

Abhishekd18 November 17, 2011 08:18

Adaptive Local Mesh Refinement
 
Hi,

I am trying to run dieselDyMFoam with adaptive local mesh refinement. I getting following error. Can anyone help?

Thanks.
-

Evolving Spray
Selected 66616 cells for refinement out of 68700.
Refined from 68700 to 535012 cells.


--> FOAM FATAL ERROR:
Not implemented

From function cloud::autoMap(const mapPolyMesh&)
in file fields/cloud/cloud.C at line 65.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libOpenFOAM.so"
#2 Foam::mapClouds(Foam::objectRegistry const&, Foam::mapPolyMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libfiniteVolume.so"
#3 Foam::fvMesh::mapFields(Foam::mapPolyMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libfiniteVolume.so"
#4 Foam::fvMesh::updateMesh(Foam::mapPolyMesh const&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libfiniteVolume.so"
#5 Foam::dynamicRefineFvMesh::refine(Foam::List<int> const&) in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libdynamicFvMesh.so"
#6 Foam::dynamicRefineFvMesh::update() in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/lib/libdynamicFvMesh.so"
#7 main in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/bin/dieselDyMFoam"
#8 __libc_start_main in "/lib64/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/opt/OpenFOAM/OpenFOAM-2.0.1/platforms/linux64Gcc46DPOpt/bin/dieselDyMFoam"
Aborted

mturcios777 November 17, 2011 18:45

Hello!

Funny enough I was thinking about implementing something like this in a solver with Lagrangian particles. It appears that the function autoMap does not exist clouds for dynamicRefineFvMesh. From the source code of mapClouds.H it says:

Quote:

Generic Geometric field mapper. For "real" mapping, add template specialisations for mapping of internal fields depending on mesh type.
This probably requires creating a mapping function all the way up inside dynamicRefineFvMesh for clouds. Ugh

Abhishekd18 November 21, 2011 00:47

Hi Marco,

Can you please help me with it?

Thanks

mturcios777 November 21, 2011 11:34

I've got a bunch of other projects going I need to finish and don't think I can throw another one on. I might in the new year. In the meantime, it would be a good idea to find mapping for the other mesh types and see what steps are required. In the best case we can adapt one of the existing mappers to do what we want, otherwise we need to work from scratch.

Abhishekd18 November 21, 2011 11:42

Ok. No problem. I will continue to work it out if I can.

Abhishekd18 November 23, 2011 23:16

Hi Marco,

I checked interDyMFoam tutorial case. Adaptive Local Mesh Refinement works in it. It doesn't show any autoMap error. Then it should also work with dieselDyMFoam.

mturcios777 November 24, 2011 12:14

I looked up some more information on dieselDyMFoam and it looks like something I'd like to play around with, but I found a presentation describing its use. You are right in stating that is appears it should work "out of the box".

I'm curious as to what version of OF you are using. I think I remember that mapping Lagrangian fields wasn't available until 1.6 or even 1.7 (someone correct me, as I'm sure this is innaccurate). We can't compare dieselDyMFoam interDyMFoam as dieselDyMFoam has lagrangian fields (the injector is a cloud of parcels/particles), for which the mapper doesn't exist. Although there may be something else I'm missing; when you run the solver, at what timestep do you see this error, and what is your case like (particularly your injection profile)?

Can you post a link to where you got this solver from? It wasn't included in the standard OF install I got

Abhishekd18 November 24, 2011 12:30

I am using OF 2.0 version. However, I tried the case in OF 1.7.1 and it worked in it. But I am doubtful if it is mapping fields. When I checked the cloud.H in OF 1.7.1, it is same as that in OF 2.0 except the following line :
OF 1.7.1 : virtual void autoMap(const mapPolyMesh&) = 0;
OF 2.0 : virtual void autoMap(const mapPolyMesh&);

In cloud.C of OF 1.7.1 following lines are missing :
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //


void Foam::cloud::autoMap(const mapPolyMesh&)
{
notImplemented("cloud::autoMap(const mapPolyMesh&)");
}




// ************************************************** *********************** //

Yes. I got that we cannot compare interDyMFoam and dieselDyMFoam. I get the error when the mesh refinement starts.

I am simulating the case from Sandia Engine Combustion Network. C12H26 with inert environment.

Abhishekd18 November 24, 2011 12:40

link to the report from which i got the solver

http://www.tfd.chalmers.se/~hani/kur...tersReport.pdf

http://www.tfd.chalmers.se/~hani/kur...stersFiles.tgz

mturcios777 November 24, 2011 13:23

Thanks for the link. They changed the autoMap from pure virtual to virtual so the base class method is called to warn us that it hasn't been implemented. I wonder why the change was made, and why it fails now (if it was a pure virtual function before, then there MUST have been an implementation). Lets keep digging at the differences and see if there is anything else...

mturcios777 November 24, 2011 14:17

I'm headed off to a meeting in a couple minutes, but I noticed that there are two instances of autoMap, one for the cloud (field) class and one for the Cloud (lagrangian) class. Confusing, and I wonder if this is the source of the problem. If it worked in OF 1.7, then there must be an implementation somewhere that we can use, maybe there was a problem with the scoping of the operator?

mturcios777 March 16, 2012 13:02

Abhishek, were you able to figure out what was needed to make this work? I'm trying to implement some topology changes in engineMesh and get this error as well.

Abhishekd18 March 16, 2012 13:06

Hi,

It didn't work with OF2.0, but it worked well with OF1.7. Thereafter, I didn't do any work in that area. I used OF1.6 extend for topological changes in engineFoam.

i2a May 22, 2012 09:31

automap issue
 
Hey Marco,

Did you get a chance to work on this issue?

I was also following Anne's report for Adaptive Refinement (just like Abhishek), and stumbled onto this Automap error (precisely the first time the refinement is done).

http://www.cfd-online.com/Forums/ope...n-removal.html

The above link also suggests that you may have opted for OF-1.6-extend, due to better mesh handling capabilities.

I can just hope that you are still working with OF-2.1 and have already found your way around this issue.

Please let me know.

mturcios777 July 25, 2012 18:52

Quote:

Originally Posted by i2a (Post 362457)
Hey Marco,

Did you get a chance to work on this issue?

I was also following Anne's report for Adaptive Refinement (just like Abhishek), and stumbled onto this Automap error (precisely the first time the refinement is done).

http://www.cfd-online.com/Forums/ope...n-removal.html

The above link also suggests that you may have opted for OF-1.6-extend, due to better mesh handling capabilities.

I can just hope that you are still working with OF-2.1 and have already found your way around this issue.

Please let me know.

Sorry its been a while, I was a little too aggressive with unsubscribing from old threads. I wasn't able to focus on the problem at the moment, but I think there must be a way. Looking at $FOAM_SRC/langrangian library, the autoMap function that should be called is in Cloud.C. I'm not sure why the cloud field can't see it, so I'm going to try tweaking the lagrangian library until it works.

I've added an update note on the bug report I filed a while back. Maybe they are planning this for an upcoming release, but this seems like a pretty serious bug to me. If you can add anything to the report, please do!

http://www.openfoam.org/mantisbt/view.php?id=464

mturcios777 August 13, 2012 12:34

For those who follow this thread, the issue with lagrangian mapping has been solved and now works wonderfully in 2.1.x!

i2a August 13, 2012 14:09

Perfect.........Thanks a lot Marco

kalle August 21, 2012 08:23

Thanks for your efforts Marco!

I tried the case from the bug tracker and is seems to run. But when trying in parallel it crashes with an MPI error as soon as it tries refining the mesh (10th time step):

Code:

Courant Number mean: 4.65837e-05 max: 0.257974
deltaT = 5.04444e-06
Time = 4.49556e-05

Selected 33 cells for refinement out of 168100.
Refined from 168100 to 168331 cells.
Selected 0 split points out of a possible 33.
Execution time for mesh.update() = 0 s

Solving cloud sprayCloud
[lxcw17:1601] *** An error occurred in MPI_Recv
[lxcw17:1601] *** on communicator MPI_COMM_WORLD
[lxcw17:1601] *** MPI_ERR_TRUNCATE: message truncated
[lxcw17:1601] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)

However, the ugly hack as suggested here made it runnable in parallel: http://www.openfoam.org/mantisbt/view.php?id=577


Did you try this in parallel, or were you satisfied with serial run?


Regards,
Kalle

mturcios777 August 21, 2012 11:57

I haven't run any parallel cases yet, but its good to know about this issue for future reference. I know Rickard.Solsjo was looking at parallel runs. It looks like the problem is still outstanding, so we'll have to watch for it.

See if you can get the developers attention by bumping the thread; they may already be working on it and need some users feedback to fix it.

Regards!

kalle August 22, 2012 06:16

Thanks for your answer! I dug a bit further to pinpoint the issue... it was rather easy to locate it, so I do not know why they did not respond. Either a nice fix is less easy to come up with, or this is actually not a bug, but rather me making studpid errors...

K


All times are GMT -4. The time now is 13:04.