decomposePar for custom solvers and boundary conditions
dear foamers,
I am grateful that you are interested in parallel computing and the decomposePar utility. I now encounter 2 problems when parallelizing mySlover: (1) the custom boundary conditions. In the 0 or latestTime directory, one of the patch is as follows (before decomposePar): Code:
myPatchName Code:
myPatchName Code:
{ Code:
myPatchName Code:
myPatchName (2) as you may have known, the above is for the 2D case. while mySolver is the one that coupling 1D and 2D computation. So should I only make the 2D computing parallelizable or both the 1D and 2D? and if possible, how could i make the implementation? I am very appreciated if someone understands my problem and kindly gives some hints. and also, feel free to remedy my mistakes. thanks a lot! /karelke |
Quick answers:
For the first issue, without seeing the source code, the best I can do is suggest that you take a better look at OpenFOAM's own boundary conditions for ideas on how these variables are handled in the constructors and in the "write" method. In addition, see this post for more ideas: http://www.cfd-online.com/Forums/ope...tml#post567594 - post #8 For the second issue, I can't figure out what you're asking from your description :( Please provide more details. |
2 Attachment(s)
Quote:
for the first issue, myBC is attached. for the second one, i mean that the 1D solver is totally user-developed. its framework is not exactly confirm to the OF convention, especially for the 1D mesh and solution schemes. so I feel quit difficult to make my coupled solver parallelizable. besides, I think that the 1D calculation is not very time-consuming. so is it possible to only parallel computing the 2D problem? and how this will effect the 1D solution? hope i've made that clear. thanks for your attention. |
Quick answers:
Quote:
Code:
timeVaryingVolumeFluxInletDPUWFvPatchVectorField:: Code:
timeVaryingVolumeFluxInletDPUWFvPatchVectorField:: Quote:
OpenFOAM relies in using the boundary condition "empty" for neutralizing a direction. Therefore, if you have a 1D problem, then your mesh should only be 1 cell of width over 2 directions and on those directions you should use the "empty" boundary condition. As for the equations, you should define them the same way as OpenFOAM does for other solvers. As for coupling... it depends on the type of coupling you're trying to do. For example, "chtMultiRegionFoam" is a complex solver that serves as an example on how OpenFOAM and handle coupling between semi-independent mesh regions. But there is also the coupling that can be done at the matrix solver level: http://www.openfoam.org/version2.2.0/matrix-solvers.php |
Quote:
Code:
timeVaryingVolumeFluxInletDPUWFvPatchVectorField:: it seems that the setFields utility could make it. but is there more tips about this tool or other ways to do that? there is only one region in the tutorial interFoam. thanks for your help and i hope i do not make personal foul.:) |
All times are GMT -4. The time now is 06:45. |