Indentify internal field value at specific patch
Hi guys,
I have a patch named "fluid_to solid" in my mesh. In order to copy the values of a field in correspondence to this specific field I have written the following code: Code:
forAll( TFluid[j].boundaryField(), patchi) My problem now is copy the internal values of the same field at the patch "fluid_to_solid"... Can anyone help me? Best Giancarlo |
i need to do such work.i didn't grasp.what does this code do exactly? And where in code should it be added?(i use rhoPimpleFoam)
Thanks. |
This is my solver that I have developed. I need to know the value of internalField only of the cells located at interface. (named "fluid_to_solid")
|
Hi Giancarlo,
I hope this is what you were looking for. Once you have the right patchID you can use something like: Code:
const fvPatchVectorField& Uw = U.boundaryField()[patchI]; Cheers, L |
Good morning,
As an alternative, you can also work with the faceCells in case you have access to the whole of the volume field. This goes something along these lines, and assume that you have a fvPatch called "patch". Code:
const polyPatch & pp = patch.patch(); Kind regards Niels |
Thanks all,
I have solved in this manner: Code:
Giancarlo |
I use this kind of code, I don't know if it works for multi region mesh:
Code:
label patchWall = mesh.boundaryMesh().findPatchID("wall"); //patchID = id of the patch wall |
All times are GMT -4. The time now is 03:55. |