![]() |
DirectMappedPatchBase, offset and samplePatch
Dear Foamers,
I've encountered an issue I couldn't quite understand when using the directMappedVelocityFlux boundary condition. In the ./constant/polyMesh/boundary file I specify the following: Code:
inlet1The problem comes when running pisoFoam, which returns the following error: Code:
--> FOAM FATAL ERROR: However! Changing the offset value to (2 0 0) does work! Any tips/ideas why? :confused: :confused: :confused: And when specifying that offset, the mapped velocities are taken from the patches outlet1 and outlet2 located at (6 0 0) -which was what I was trying to achieve-, but having absolutely nothing to do with the offset (2 0 0)... So I was thinking that maybe I was misunderstanding the concept of the offset value, and I was wondering if someone would happen to know what the offset value is compared to the samplePatch option? Do they have anything to do with each other? Looking forward to you replies! Francois. |
Hi Francois,
I don't know if you are still using OpenFOAM and anyway I guess you have solved this problem, but I'm going to answer your question hoping it will be useful for other foamers. In offset dictionary you have to put the distance between the mapped patches. For example: I want to map a fan_outlet patch to the fan_inlet one; fan_outlet is a linear extrusion of fan_inlet patch in positive y direction for 2.75 meters. This is how I set my constant/polyMesh/boundary file Code:
fan_outlet |
Question
Hi Elia,
I am having trouble understanding what it means to map a patch. Does this map all the surface fields to the new patch? I'm trying to generate a mappedPatch for use with the viewFactorsGen utility for radiation modelling. Specifically, I don't understand what you mean by one patch being a 'linear extrusion' of another. My understanding is that an extrusion of an area is a volume, but the extrusion you're talking about is still surely a patch area. I wonder if you could explain this a bit further. Thank you for posting this just for a sake of fellow foamers! Cheers, Jeff |
2 Attachment(s)
Hi Jeffzda,
I will try to better explain myself. I have modeled a jet fan in a road tunnel as a simple cave cylinder (in figure 1.png you can see a slice of the tunnel with fan_inlet and fan_outlet patches). For some reasons I want the flow through fan_outlet to be the same as the fan_inlet's one, so I mapped U, epsilon, k and nut from fan_inlet (where they have a 'zeroGradient' boundary condition) to fan_outlet. In figure 2.png you can see for example the axial component of velocity on fan_inlet and fan_outlet patches. To do this it is necessary to use a 'mapped' boundary conditions on fan_outlet for U and turbulent quantities. Code:
// content of 0/U file // So I have manually modified (it is not necessary to use 'createPatch' in this case, at least in OF 2.1.x) the 'constant/polyMesh/boundary' file for fan_outlet Code:
// content of constant/polyMesh/boundary file //PS: I used a 'mapped' boundary condition for U, k and epsilon, but for p I used a 'zeroGradient' condition on fan_outlet. So I think you can choose which fields to map on the 'mappedPatch'. If you use a BC type different from 'mapped', the 'mappedPatch' (fan_outlet in my case) will behave as a simple patch of 'patch' type. |
Hi Elia,
Thanks for your reply, that is much clearer now! Jeff |
| All times are GMT -4. The time now is 09:17. |