CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Adaptive Local Mesh Refinement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2011, 08:18
Default Adaptive Local Mesh Refinement
  #1
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
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:rintStack(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:bjectRegistry 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
Abhishekd18 is offline   Reply With Quote

Old   November 17, 2011, 18:45
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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
mturcios777 is offline   Reply With Quote

Old   November 21, 2011, 00:47
Default
  #3
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
Hi Marco,

Can you please help me with it?

Thanks
Abhishekd18 is offline   Reply With Quote

Old   November 21, 2011, 11:34
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   November 21, 2011, 11:42
Default
  #5
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
Ok. No problem. I will continue to work it out if I can.
Abhishekd18 is offline   Reply With Quote

Old   November 23, 2011, 23:16
Default
  #6
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
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.
Abhishekd18 is offline   Reply With Quote

Old   November 24, 2011, 12:14
Default
  #7
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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

Last edited by mturcios777; November 24, 2011 at 12:24. Reason: EDIT: Request for link to solver
mturcios777 is offline   Reply With Quote

Old   November 24, 2011, 12:30
Default
  #8
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
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 is offline   Reply With Quote

Old   November 24, 2011, 12:40
Default
  #9
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
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
Abhishekd18 is offline   Reply With Quote

Old   November 24, 2011, 13:23
Default
  #10
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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 is offline   Reply With Quote

Old   November 24, 2011, 14:17
Default
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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 is offline   Reply With Quote

Old   March 16, 2012, 13:02
Default
  #12
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   March 16, 2012, 13:06
Default
  #13
Member
 
Abhishek
Join Date: Dec 2010
Posts: 39
Rep Power: 15
Abhishekd18 is on a distinguished road
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.
Abhishekd18 is offline   Reply With Quote

Old   May 22, 2012, 09:31
Default automap issue
  #14
i2a
New Member
 
combustion modeling
Join Date: Mar 2012
Posts: 6
Rep Power: 14
i2a is on a distinguished road
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.
i2a is offline   Reply With Quote

Old   July 25, 2012, 18:52
Default
  #15
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Quote:
Originally Posted by i2a View Post
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 is offline   Reply With Quote

Old   August 13, 2012, 12:34
Default
  #16
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
For those who follow this thread, the issue with lagrangian mapping has been solved and now works wonderfully in 2.1.x!
mturcios777 is offline   Reply With Quote

Old   August 13, 2012, 14:09
Default
  #17
i2a
New Member
 
combustion modeling
Join Date: Mar 2012
Posts: 6
Rep Power: 14
i2a is on a distinguished road
Perfect.........Thanks a lot Marco
i2a is offline   Reply With Quote

Old   August 21, 2012, 08:23
Default
  #18
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
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
kalle is offline   Reply With Quote

Old   August 21, 2012, 11:57
Default
  #19
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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!
mturcios777 is offline   Reply With Quote

Old   August 22, 2012, 06:16
Default
  #20
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
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
kalle is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Technical] Local adaptive mesh refinement with hybrid meshes holger_marschall OpenFOAM Meshing & Mesh Conversion 5 December 21, 2010 13:38
Adaptive Mesh Refinement and Cyclic Boundary Conditions adona058 OpenFOAM Running, Solving & CFD 6 October 23, 2009 09:17
basic of mesh refinement arya CFX 4 June 19, 2007 12:21
Mesh Refinement JY Siemens 7 September 19, 2002 13:37
Hints on adaptive mesh refinement Bo Jensen Siemens 0 July 17, 2000 08:39


All times are GMT -4. The time now is 17:51.