|
[Sponsors] |
Confirmation Needed on fvMeshSubset and Moving Meshes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2010, 17:14 |
Confirmation Needed on fvMeshSubset and Moving Meshes
|
#1 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi all
I am solving an advection-diffusion equation for suspended sediment transport (variable c). The physical models describe the boundary condition to be set some distance from the bed, say 2d_50 (d_50 being median grain diameter), hence I will use fvMeshSubset to get the computational domain on which I will solve for c. The sediment transport results in bed level changes and it is being moved using the moving mesh capabilities on the entire mesh. My question/confirmation quest is: The fvMesh obtained using fvMeshSubset (local mesh) is a reference to the global fvMesh, so please confirm that moving the pointField on the global mesh carries over to the local mesh? Thank you very much for your time, Niels |
|
September 17, 2010, 09:06 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi all
To follow up on my questions, I have come closer to an answer. First of all, it is possible to do what I described (thanks to the OpenFOAM for a very flexible mesh handling). However, there is a little twist in the mesh handling, as the points in the submesh is not updated automatically. Therefor, this is a small guide to how I handled the coupling (everything is based on 1.5, where the fvMeshSubset is constructed differently as in 1.7!): 1. Create the submesh: Code:
fvMeshSubset submesh( c, mesh ); // c is in this case a volScalarField cellSet cCells(mesh, "cCells"); submesh.setLargeCellSubset(cCells, patchID, true); // patchID is the patch number, which the previously internal faces must adopt. fvMesh & cMesh = submesh.subMesh(); Code:
const labelList & pointMap_(submesh.pointMap()); const pointField & pp(mesh.points()); pointField cpp(pointMap_.size(), vector::zero); forAll ( pointMap_, pointi ) { cpp[pointi] = pp[pointMap_[pointi]]; } cMesh.movePoints(cpp); Have a nice weekend, Niels |
|
|
|