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

[codedFixedValue] - reversing patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By NiklasW

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2024, 04:13
Default [codedFixedValue] - reversing patch
  #1
New Member
 
Dasha
Join Date: Sep 2023
Posts: 15
Rep Power: 2
DashaSh is on a distinguished road
Hello! I'm using 'codedFixedValue' for the inlet, which depends on the outlet patch.

I have a problem: the values on the inlet patch are 'mirrored' from the outlet patch. How can I fix this? Is there any possibility to reverse the face of the patch?


Code:
forAll(TField, faceI)
             {
                TField[faceI] = fieldOAP[faceI] + 5;
             }
I have also added a schematic image for clarity.
https://imgur.com/D9jN5kV

DashaSh is offline   Reply With Quote

Old   February 2, 2024, 09:05
Default
  #2
New Member
 
Join Date: May 2019
Posts: 16
Rep Power: 7
NiklasW is on a distinguished road
Hi
as an easy fix, you could maybe rewrite it to:
Code:
forAll(TField, faceI)
             {
                TField[TField.size() - 1 - faceI] = fieldOAP[faceI] + 5;
             }
so that one of the patches counts the face ids backwards.
DashaSh likes this.
NiklasW is offline   Reply With Quote

Old   February 2, 2024, 09:40
Default
  #3
New Member
 
Dasha
Join Date: Sep 2023
Posts: 15
Rep Power: 2
DashaSh is on a distinguished road
Thanks a lot!
DashaSh is offline   Reply With Quote

Reply

Tags
codedfixedvalue, facei, reverse patch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OLAFLOW] The OLAFLOW Thread Phicau OpenFOAM Community Contributions 457 March 27, 2024 00:59
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
steadyUniversalMRFFoam Tutorial fails in MixingPlane HenrikJohansson OpenFOAM Bugs 0 February 14, 2019 04:48
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 16:23.