CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Map a field across patch between two meshes

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 14, 2019, 21:58
Default Map a field across patch between two meshes
  #1
Member
 
Join Date: Mar 2019
Posts: 86
Rep Power: 7
celestial is on a distinguished road
Hi everybody

Either this will be obvious to most of you or else it will be baffling to all.
I have no idea and so I have to give it a shot.

Here is a short excerpt from my createFields.H :

.........


Info<< "Reading field Fa, Fs \n" << endl;

volScalarField Fa
(
IOobject
(
"Fa",
runTime.timeName(),
airMesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
airMesh
);

volScalarField Fs
(
IOobject
(
"Fs",
runTime.timeName(),
solidMesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidMesh
);

..........

and what follows is a relevant excerpt from my C code:



...............

// patch airsolid is defined in the case dictionaries polyMesh for both meshes //airMesh and solidMesh
// the two meshes were created independently of each other. They only share the common interface airsolid in the geometry


const label id1= airMesh.boundaryMesh().findPatchID"airsolid");
const fvPatch& patch1 = airMesh.boundary()[id1];


const label id2= solidMesh.boundaryMesh().findPatchID"airsolid");
const fvPatch& patch2 = solidMesh.boundary()[id2];




scalarField dummy(patch1.size(), scalar(0) );


forAll(patch1, i)
{

dummy[i] = Fa[patch1.faceCells()[i] ] - ????;


// the above line is my problem.
// by ???? I mean some kind of interpolation of the values on the solid side:

// Fs[patch2.faceCells()[j] ] where the values of j will depend on the // current value of i
// (of course, j lies in the range 0 to patch2.size)


}

............

The question is whether any such mapping actually exist in OF.


At any rate, best regards to the community regardless of what come out of this inquiry.
celestial is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get chtMultiRegionSimpleFoam to working. shiromaniac OpenFOAM Running, Solving & CFD 11 October 18, 2021 08:40
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Meshing & Mesh Conversion 2 March 8, 2018 01:47
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL AndoniBM OpenFOAM Running, Solving & CFD 2 March 25, 2015 18:44
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 17:51.