|
[Sponsors] |
Custom boundary condition: unexpected behavior with chtMultiRegionFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2014, 13:51 |
Custom boundary condition: unexpected behavior with chtMultiRegionFoam
|
#1 |
Member
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14 |
Dear OpenFOAM users,
I recently wrote a simple custom boundary condition which computes the fluid velocity at the wall using a formula of the type: v = f(rho) * normal While my code yields the expected results using the rhoPimpleFoam solver, everything is messed up when using it with chtMultiRegionFoam, even though I use the exact same parameters for the BC. The near-wall velocity has an inverted orientation, and the upstream flow has a stagnation point, even if the wall velocity is oriented downstream. This is obviously a physical and numerical nonsense ... Is there something in particular that should be taken care of when using chtMultiRegionFoam with custom BCs? Parameters with rhoPimpleFoam: Code:
squareWall { type pyrolysisVelocity; refValue 0.001; massPR 0.001; rhoS -1; rhoName rho; } With chtMultiRegionFoam: Code:
fluid_to_solid { type pyrolysisVelocity; refValue 0.001; massPR 0.001; rhoS -1; rhoName rho; } Last edited by leroyv; January 29, 2014 at 06:10. Reason: corrected typos |
|
January 29, 2014, 12:42 |
Update
|
#2 |
Member
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14 |
A little progress update: I went through the code and did some additional debugging. The coordinates of velocity on the patch seem to be computed correctly: I checked the values in the output files.
The results with a surfaceNormalFixedValue BC are okay: https://www.dropbox.com/s/zui2qaz9tz...FixedValue.png I'm guessing something wrong happens when running the updateCoeffs() method, maybe I shouldn't use the fixedValueFvPatchVectorField::operator==() member function? Last edited by leroyv; January 29, 2014 at 12:44. Reason: disabled smilies |
|
January 30, 2014, 10:30 |
Update
|
#3 |
Member
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14 |
I ran an additional test using swak4foam:
Code:
fluid_to_solid { type groovyBC; valueExpression "- 0.001 * normal()"; } https://www.dropbox.com/s/0yjr5vca1y..._swak4foam.png |
|
February 1, 2014, 08:49 |
Update
|
#4 |
Member
Vincent Leroy
Join Date: Jul 2012
Location: Rhode-Saint-Genèse, Belgium
Posts: 43
Rep Power: 14 |
I computed the mass flux using the patchIntegrate utility.
Solver: chtMultiRegionFoam (using BCs for isothermal flow) Inlet mass flux: 0.000811 kg/s 1. BC: surfaceNormalFixedValue, -0.001 fluid_to_solid mass flux: 0.000463 kg/s Outlet mass flux: 0.00127 kg/s 2. BC: groovyBC, "- 0.001 * normal()" fluid_to_solid mass flux: <something>e-20 = 0 kg/s Outlet mass flux: 0.000811 kg/s Mass conversation seems to be okay. Something might be going wrong with the phi field, because the value of U at the boundary seems to be fine: Code:
value nonuniform List<vector> 40 ( (0.001 0 0) (0 -0.001 0) (0.001 0 0) (0.001 0 0) (0.001 0 0) (0.001 0 0) (0.001 -0 0) (0.001 -0 0) (0.001 -0 0) (0.001 -0 0) (0.001 -0 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (0 -0.001 0) (0 0.001 0) (-0.001 -0 0) (0 -0.001 0) (-0.001 -0 0) (-0.001 -0 0) (-0.001 -0 0) (-0.001 -0 0) (-0.001 0 0) (-0.001 0 0) (-0.001 0 0) (-0.001 0 0) (0 0.001 0) (-0.001 0 0) ) |
|
Tags |
boundary condition, chtmultiregionfoam, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mathematical representation of fixedDisplacementZeroShear boundary condition | Sargam05 | OpenFOAM | 14 | January 11, 2022 07:55 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |
Velocity profile boundary condition | Tuca | FLOW-3D | 1 | April 23, 2013 13:02 |
Bug in fvc::grad() and periodic boundary condition | JBUNSW | OpenFOAM | 3 | November 15, 2012 04:09 |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 01:55 |