|
[Sponsors] |
April 21, 2021, 00:30 |
codedMixed BC not applied
|
#1 |
New Member
mahesh
Join Date: May 2019
Posts: 1
Rep Power: 0 |
Hi,
I am trying to apply fixedValue BC to some portion of the boundary patch and zeroGradient to remaining patch. I used codedMixed to apply the BC. What I found was, though the code compiles fine, the BC's are not applied to the patch. I am attaching the code. Can any one please tell me where I made the mistake. Code:
upperWall { type codedMixed; refValue uniform 0; refGradient uniform 0; valueFraction uniform 0; name upperWallMixed; code #{ const fvPatch& bp = this->patch(); const vectorField& cf = bp.Cf(); scalarField& rValue = this->refValue(); scalarField& rGrad = this->refGrad(); scalarField& vFraction = this->valueFraction(); forAll(cf, i) { const scalar x = cf[i].x(); if ((x > 0.2) && (x < 0.3)) { rValue[i] = 10; rGrad[i] = 0.0; vFraction[i] = 1; } rValue[i] = 0; rGrad[i] = 0.0; vFraction[i] = 0; } #}; } |
|
Tags |
codedmixed |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Intuition for why flow follows convex surfaces | lopp | Main CFD Forum | 47 | February 1, 2022 14:14 |
Different results using Swak and CodedMixed | gionni | OpenFOAM Programming & Development | 2 | March 12, 2021 07:22 |
codedMixed condition - not applied | s.blaise | OpenFOAM Pre-Processing | 1 | September 3, 2020 05:54 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
COMSOL: optimization applied to a laminar flow | tdh89 | COMSOL | 0 | April 30, 2012 09:57 |