|
[Sponsors] |
October 31, 2017, 20:53 |
dynamicRefineFvMesh problem
|
#1 | |
New Member
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11 |
Hello guys!
I am trying to use dynamicRefineFVMesh based on velocity magnitude field. Here is my dict: Code:
dynamicFvMesh dynamicRefineFvMesh; // How often to refine refineInterval 1; // Field to be refinement on field U; // Refine field inbetween lower..upper lowerRefineLevel 0.1; upperRefineLevel 13; // If value < unrefineLevel unrefine unrefineLevel 10; // Have slower than 2:1 refinement nBufferLayers 1; // Refine cells only up to maxRefinement levels maxRefinement 1; // Stop refinement if maxCells reached maxCells 2000000; Code:
--> FOAM FATAL ERROR: lookup of U from objectRegistry region0 successful but it is not a volScalarField, it is a volVectorField From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>] in file /home/kepchuk/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 226. FOAM aborting Quote:
Regards, Petr |
||
November 1, 2017, 05:06 |
|
#2 |
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17 |
This one is easy.
just read the error message and you can figure this out yourself .. . . . . . . . . . . No? OK. The refinement works only on the scalar fields and your velocity is vector field. So if you want to refine with the velocity it must be velocity magnitude or velocity component ... scalar values. You may use Function object to create magnitude of U. happy foaming matej |
|
November 1, 2017, 11:55 |
|
#3 |
New Member
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11 |
Sure, I tried all this stuff
|
|
November 1, 2017, 12:01 |
|
#4 | |
New Member
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11 |
Matej, of course I tried whatever I could imagine before writing this post: magnitudes, functionObjects etc. However, it does see vector U. Also, Openfoam WIKI stated that
Quote:
It does not see any variables calculated from "outside". I came to the conclusion that only writing the custom version of dynamicRefineFvMesh will resolve the problem.I was just hoping that there could be some tricks which could help with the issue. May be there are some.. Best regards, Petr |
||
November 1, 2017, 12:22 |
|
#5 |
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17 |
Well well, maybe then worth reporting ( I see you are using 1706) the issue here: develop.openfoam.com
Sorry does not have time to look deeper into it at the moment. I was just trying to be lucky with a simple hint. Pity. Btw. out of curiosity, why are you refining with the velocity magnitude? What is the application? I can imagine you want to use gradient (which would not solve the problem either). |
|
November 9, 2017, 07:36 |
|
#6 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
If you can compile the solver yourself you can also just calculate a field with the appropriate indicator and use that.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with interFoam; Wave/wiggle alpha1 behavior | JonW | OpenFOAM | 10 | February 4, 2023 08:27 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |