|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
PA
Join Date: Mar 2009
Posts: 27
Rep Power: 18 ![]() |
Hi all,
I have tried searching for a solution to my "problem" but so far I only came across Possible to sum across different patches? which seems clutter my code with similar expressions ![]() I have a number of patches which might change in number so to avoid too much editing of code from simulation to simulation with the risk of missing something I would like to go from Code:
"pressure{patch1}=p*rho*normal()*area();"
...
"pressure{patchN}=p*rho*normal()*area();"
Code:
grouped_patches
(
patch1
...
patchN
)
"pressure{grouped_patches}=p*rho*normal()*area();"
Any help is appreciated
__________________
Regards, Per |
|
|
|
|
|
|
|
|
#2 |
|
New Member
PA
Join Date: Mar 2009
Posts: 27
Rep Power: 18 ![]() |
So it seems creating a faceSet with topoSet for all the patches I want would do the job in this particular case.
Code:
"pressure{faceSet'grouped_patches}=p*rho*normal()*area();"
Code:
"viscous{faceSet'grouped_patches}=sum(-nu*snGrad(U)*area());"
Also, doing the following gives a similar missing field error on the density. Code:
"density=997;"
"pressure_forces{faceSet'grouped_patches}=density*sum(p*normal()*area());"
Code:
"density=997;"
"pressure_forces{faceSet'grouped_patches}=sum(p*normal()*area());"
"pressure_forces_density=density*pressure_forces;"
__________________
Regards, Per Last edited by pad; November 14, 2021 at 11:26. |
|
|
|
|
|
![]() |
| Tags |
| external expression, grouping of patches, swak4foam |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
| Problem using AMI | vinz | OpenFOAM Running, Solving & CFD | 298 | November 13, 2023 09:19 |
| [snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." | lethu | OpenFOAM Meshing & Mesh Conversion | 1 | June 3, 2020 08:49 |
| Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 09:00 |
| Cyclic boundaries in OF 21x | morard | OpenFOAM | 25 | May 13, 2013 23:35 |