|
[Sponsors] |
March 18, 2024, 13:51 |
Duplicate and sort a patch
|
#1 |
Member
MC
Join Date: Apr 2021
Posts: 43
Rep Power: 5 |
Hello,
I just started programming in OpenFOAM and, as exercise, I wanted to develop radial equilibrium boundary conditions on a given patch. To this scope, I first converted the cartesian coordinates to cylindrical coordinates and make some operations to obtain the tangential velocity component. My mesh is structured and follows the annulus profile (this simplifies the implementation...) However, to apply the radial equilibrium I need to have sorted coordinates (from min to max radius), so it is easier to store everything in a matrix N_radius x N_theta (where N_radius and N_theta are the number of radial and tangential positions). I think the best idea is to copy the patch, sort it, apply the radial equilibrium, and then interpolate back on the non-sorted grid. I think I can handle the interpolation, I just need to find a quick way for duplicate and sort the patch and the related flow fields. I could not find examples on how to do that, and I would like to know if you could help me (or give good references) on how I could do this implementation using existing OpenFOAM syntax and programming logic. Thanks a lot for your help |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fvDOM OpenFOAM wedge type patch | jaydeep | OpenFOAM Running, Solving & CFD | 3 | January 27, 2021 02:48 |
Changing viewfactor Model and use the changed my model by calling "mySolver" | FabianF | OpenFOAM Programming & Development | 2 | January 14, 2014 11:25 |