|
[Sponsors] |
Unable copy boundary values of the pressure field (p) to a new field (p1) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 28, 2024, 09:15 |
Unable copy boundary values of the pressure field (p) to a new field (p1)
|
#1 |
New Member
RAJESH.P
Join Date: Feb 2011
Posts: 4
Rep Power: 15 |
Hi, Foamers, I am making some modifications on the icoFoam solver and needs some help in copying the boundary values of pressure field p and velocity field U to a new pressure field p1 and velocity field U1. I tried the following following code.
Code:
forAll(U.boundaryField(),patchI) { U1.boundaryField()[patchI] == U.boundaryField()[patchI] ; } forAll(p.boundaryField(),patchI) { p1.boundaryField()[patchI] == p.boundaryField()[patchI] ; } HTML Code:
error: no match for ‘operator==’ (operand types are ‘const Foam::fvPatchField<double>’ and ‘const Foam::fvPatchField<double>’) 105 | p1.boundaryField()[patchI] == p.boundaryField()[patchI] ; In file included from /home/proj/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude/volFields.H:40, from /home/proj/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:27, Kindly help! Thanks in advance. |
|
June 10, 2024, 08:33 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
You can read the double equals as "forced assignment" (ie, copy in the values even if the BC is nominally not assignable). Of course, this also implies that the left-hand-side is actually assignable. For example, Code:
U1.boundaryFieldRef() == U.boundaryField(); Info: https://www.openfoam.com/documentati...ea65c28097d3f6 |
||
Tags |
icofoam, openfoam 9, pressure, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |