|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Feb 2021
Posts: 2
Rep Power: 0 ![]() |
Hi guys
![]() boundaryField { Left { type fixedFluxPressure; } . .// other BCs . } then change it to : boundaryField { Left { type fixedValue; value 1e5; } . .// other BCs . } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Feb 2021
Posts: 2
Rep Power: 0 ![]() |
finally i found it and i leave this reply to my post maybe help another one with this issue some days later.
to change boundary condition type for a field, first you must find patch id of that face. label leftFacePatchID = mesh.boundaryMesh().findPatchID("Left"); const polyPatch& leftPatch = mesh.boundaryMesh()[leftFacePatchID]; then you can set boundary type with this syntax: (for example if pressure is desired field with p notation) p.boundaryFieldRef().set(leftFacePatchID , fvPatchField<scalar>::New("fixedValue", mesh.boundary()[leftFacePatchID ],p)); in above, first argument of New() must be boundary type, and for example here it sets BC to fixedValue. then to assign a value to this fixed value BC, we must go through all cells face in patch and set desired value. forAll(leftPatch , faceI) { p.boundaryFieldRef()[leftFacePatchID][faceI] = pressureValue; } |
|
![]() |
![]() |
![]() |
Tags |
boundary condition, cfd, solver |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 07:30 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 01:44 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 05:15 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 14:16 |