|
[Sponsors] |
[Other] dynamicMeshDict dynamicRefineFvMesh with rhoCentralFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 30, 2022, 05:38 |
dynamicMeshDict dynamicRefineFvMesh with rhoCentralFoam
|
#1 |
Member
Vinzenz Götz
Join Date: Mar 2021
Location: Munich, Germany
Posts: 31
Rep Power: 5 |
Hi,
so I am using OF8 and I want to adaptively refine my mesh in areas where the magnitude of grad(p) is high. rhoCentralFoam does only take volScalarFields though. Since this is the case, how can I get this to work? Any help would be greatly appreciated. The output for rhoCentralFoam looks like this: Code:
[0] [0] [0] --> FOAM FATAL ERROR: [0] request for volScalarField mag(Grad(p)) from objectRegistry region0 failed available objects of type volScalarField are 20 ( thermo:mu thermo:psi rhoE_0 nut yWall rho k thermo:psi_0 e_0 alphat rho_0 p T rhoE k_0 p_0 e omega omega_0 thermo:alpha ) Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object dynamicMeshDict; } dynamicFvMesh dynamicRefineFvMesh; dynamicRefineFvMeshCoeffs { refineInterval 5; field mag(Grad(p)); lowerRefineLevel 3e5; upperRefineLevel 4e5; unrefineLevel 1e5; nBufferLayers 5; maxRefinement 3; maxCells 1000000; correctFluxes ( (phi U) ); dumpLevel true; } |
|
July 1, 2022, 04:04 |
Solution
|
#2 |
Member
Vinzenz Götz
Join Date: Mar 2021
Location: Munich, Germany
Posts: 31
Rep Power: 5 |
So I've found a solution to this problem. Create two new functions in the controlDict. First a function giving grad(p) (you can look this up in the documentation for functionObjects) then another function to create mag of grad(p). This new field can be set in the dynamicMeshDict as the fild to work on.
|
|
Tags |
amr, dynamic meshing, dynamicmeshdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DynamicRefineFvMesh & Supersonic Erosion | siefer92 | OpenFOAM Programming & Development | 1 | February 4, 2021 18:00 |
Modify rhoCentralFoam: other equations of state | fivos | OpenFOAM Programming & Development | 5 | July 29, 2020 14:17 |
Does dynamicRefineFvMesh work with unstructured tetra meshes? | giovanni.medici | OpenFOAM Running, Solving & CFD | 2 | August 23, 2017 03:35 |
I can't understand the moving function of "libfvMotionSolver.so" in dynamicMeshDict | Jung hoo | OpenFOAM Programming & Development | 0 | July 13, 2016 04:36 |
DynamicMeshDict dynamicRefineFvMesh in 2D | lukasfischer | OpenFOAM Running, Solving & CFD | 4 | November 10, 2014 08:19 |