|
[Sponsors] |
November 8, 2021, 07:27 |
Grouping patches in swak4foam
|
#1 |
New Member
PA
Join Date: Mar 2009
Posts: 25
Rep Power: 17 |
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 |
|
November 12, 2021, 04:14 |
Workaround/solution found but new issue with fields
|
#2 |
New Member
PA
Join Date: Mar 2009
Posts: 25
Rep Power: 17 |
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 10:26. |
|
Tags |
external expression, grouping of patches, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 07:56 |
Problem using AMI | vinz | OpenFOAM Running, Solving & CFD | 298 | November 13, 2023 08:19 |
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." | lethu | OpenFOAM Meshing & Mesh Conversion | 1 | June 3, 2020 07:49 |
Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 08:00 |
Cyclic boundaries in OF 21x | morard | OpenFOAM | 25 | May 13, 2013 22:35 |