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

dynamicRefineFvMesh problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2017, 19:53
Default dynamicRefineFvMesh problem
  #1
New Member
 
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11
Petr Kazarin is on a distinguished road
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;
As an output i get this ERROR:

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
However, on the OpenfoamWIKI it is said that
Quote:
If a vector field is used, the dictionary will utilize the vector magnitude of that field. Only one field can be specified for mesh refinement.
How to use U as a filed in that dict?


Regards, Petr
Petr Kazarin is offline   Reply With Quote

Old   November 1, 2017, 04:06
Default
  #2
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
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
matejfor is offline   Reply With Quote

Old   November 1, 2017, 10:55
Default
  #3
New Member
 
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11
Petr Kazarin is on a distinguished road
Sure, I tried all this stuff
Petr Kazarin is offline   Reply With Quote

Old   November 1, 2017, 11:01
Default
  #4
New Member
 
John P
Join Date: Apr 2015
Posts: 7
Rep Power: 11
Petr Kazarin is on a distinguished road
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:
If a vector field is used, the dictionary will utilize the vector magnitude of that field. Only one field can be specified for mesh refinement.
.
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
Petr Kazarin is offline   Reply With Quote

Old   November 1, 2017, 11:22
Default
  #5
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
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).
matejfor is offline   Reply With Quote

Old   November 9, 2017, 06:36
Default
  #6
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
If you can compile the solver yourself you can also just calculate a field with the appropriate indicator and use that.
chriss85 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
Problem with interFoam; Wave/wiggle alpha1 behavior JonW OpenFOAM 10 February 4, 2023 07:27
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 21:22.