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

dynamic Mesh, correct fluxes, surfaceScalarFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2020, 05:43
Default dynamic Mesh, correct fluxes, surfaceScalarFields
  #1
Member
 
Al
Join Date: May 2019
Posts: 37
Rep Power: 6
aliyah. is on a distinguished road
Dear Foamers

I got this warning when I am using dynamic mesh in a self extended solver.

Code:
--> FOAM Warning : 
    From function Foam::autoPtr<Foam::mapPolyMesh> Foam::dynamicRefineFvMesh2D::refine(const labelList&)
    in file dynamicRefineFvMesh2D/dynamicRefineFvMesh2D.C at line 321
    Cannot find surfaceScalarField ((interpolate(grad(psi))|(mag(interpolate(grad(psi)))+(1e-06|dimChange)))&S) in user-provided flux mapping table 

5
(
rhoPhi none
phi none
alphaPhi0.water none
ghf none
nHatf none
)
    The flux mapping table is used to recreate the flux on newly created faces.
    Either add the entry if it is a flux or use (((interpolate(grad(psi))|(mag(interpolate(grad(psi)))+(1e-06|dimChange)))&S) none) to suppress this warning.
but when i am adding the following line (as it is mentioned in the warning above) to the "dynamicMeshDict" file as

Code:
correctFluxes
(
    (phi none)
    (nHatf none)
    (rhoPhi none)
    (alphaPhi0.water none)
    (ghf none)
    (((interpolate(grad(psi))|(mag(interpolate(grad(psi)))+(1e-06|dimChange)))&S) none)
);
I will get the following error:

Code:
wrong token type - expected word, found on line 0 the punctuation token '('
Also if we look at the code itself we can see the surfaceScalarField in the following part:

Code:
// calculate normal vector
volVectorField gradPsi(fvc::grad(psi));
surfaceVectorField gradPsif(fvc::interpolate(gradPsi));
surfaceVectorField nVecfv(gradPsif/(mag(gradPsif)+scalar(1.0e-6)/dimChange));
surfaceScalarField nVecf(nVecfv & mesh.Sf());
So I thought by adding (nVecf none) to the "dynamicMeshDict", the problem might be solved. because the expression which is mentioned in the first warning (((interpolate(grad(psi))|(mag(interpolate(grad(ps i)))+(1e-06|dimChange)))&S)) is surfaceVectorField nVecf.

But nothing changed and still I can see the warning.

So what do you suggest to solve this warning?
Thanks
aliyah. is offline   Reply With Quote

Old   February 2, 2021, 09:52
Default
  #2
Member
 
Lorenzo
Join Date: Apr 2020
Location: Italy
Posts: 35
Rep Power: 6
Lorenzo210 is on a distinguished road
Hi, maybe it is a bit late to try solving it.

Try writing the option in correctFluxes without a pair of brackets.

So, you wrote "(((interpolate(grad(psi))|(mag(interpolate(grad(p si)))+(1e-06|dimChange)))&S) none)", try with "((interpolate(grad(psi))|(mag(interpolate(grad(ps i)))+(1e-06|dimChange)))&S none)".
Lorenzo210 is offline   Reply With Quote

Old   October 12, 2022, 12:53
Default
  #3
New Member
 
Joshua Christopher
Join Date: Jul 2022
Posts: 7
Rep Power: 3
JChristopher is on a distinguished road
Hello aliyah,


Did you find a solution to your question? I am having essentially the same issue with my solver.


Thank you,
Joshua
JChristopher is offline   Reply With Quote

Old   October 12, 2022, 14:42
Default
  #4
Member
 
Al
Join Date: May 2019
Posts: 37
Rep Power: 6
aliyah. is on a distinguished road
Quote:
Originally Posted by JChristopher View Post
Hello aliyah,


Did you find a solution to your question? I am having essentially the same issue with my solver.


Thank you,
Joshua
Hello,

Sure, I could figure it out. First and foremost, I think this message is only a warning and has no effect on the simulation. However, the solution is usually visible in the warning. So it will be simpler to discuss the solution if you put the warning you get in the log file here.

Best,
aliyah. is offline   Reply With Quote

Old   October 13, 2022, 11:25
Default
  #5
New Member
 
Joshua Christopher
Join Date: Jul 2022
Posts: 7
Rep Power: 3
JChristopher is on a distinguished road
Quote:
Originally Posted by aliyah. View Post
Hello,

Sure, I could figure it out. First and foremost, I think this message is only a warning and has no effect on the simulation. However, the solution is usually visible in the warning. So it will be simpler to discuss the solution if you put the warning you get in the log file here.

Best,

Hi Aliyah,


I am getting the same warning but with a different flux:


Code:
--> FOAM Warning :
    From function Foam::autoPtr<Foam::mapPolyMesh> Foam::dynamicRefineFvMesh::refine(const labelList&)
    in file dynamicRefineFvMesh/dynamicRefineFvMesh.C at line 308
    Cannot find surfaceScalarField ((interpolate(eps)*magSf)*snGradCorr(Ue)) in user-provided flux mapping table
12
(
rhoPhi none
phi none
nHatf none
alphaPhi0.phase1 none
alphaPhiUn none
rhoEFlux none
rho*phi none
Ue none
ghf none
phiAbs none
rhoE none
alphaPhi none
)
    The flux mapping table is used to recreate the flux on newly created faces.
    Either add the entry if it is a flux or use (((interpolate(eps)*magSf)*snGradCorr(Ue)) none) to suppress this warning.
And, same as you, when I put "(((interpolate(eps)*magSf)*snGradCorr(Ue)) none)" into correctFluxes I get a syntax error. I tried the attempts you and Lorenzo suggested, but they did not make the warning go away.



I am getting some oscillations in the solution at the AMR boundary so I was wondering if this warning was related and wanted to resolve it. I suspect I actually need to correct the flux at the refinement boundary. I made a post before I thought of replying to this thread and seeing if you fixed it: Warning in flux mapping table with dynamicRefineFvMesh


I also had another thread that shows the oscillations of solution values (made before I thought the warning might be connected): New volScalarField incorrect values with dynamicRefineFvMesh


Thank you for your attention on this!


Regards,
Joshua
JChristopher is offline   Reply With Quote

Old   October 18, 2022, 15:19
Default
  #6
New Member
 
Joshua Christopher
Join Date: Jul 2022
Posts: 7
Rep Power: 3
JChristopher is on a distinguished road
Hi Aliyah,


I figured out how to suppress warnings of this type. I had to put the flux into createFields.H and update that at every step. I documented my fix in more detail in the other thread: Warning in flux mapping table with dynamicRefineFvMesh


Thank you again,
Joshua
JChristopher 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
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" GuiMagyar OpenFOAM Meshing & Mesh Conversion 3 August 4, 2023 12:38
Gambit problems Althea FLUENT 22 January 4, 2017 03:19
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[ICEM] Dynamic mesh setup with ICEM David121284 ANSYS Meshing & Geometry 0 April 11, 2014 04:19
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52


All times are GMT -4. The time now is 20:30.