|
[Sponsors] |
July 21, 2013, 01:52 |
Coupling velocity between two mesh regions
|
#1 |
Senior Member
Join Date: Jul 2011
Posts: 120
Rep Power: 14 |
Hi all, I am getting stuck with 2 way couple between two different solvers on different meshes and one of the face from each mesh I am require to match their velocities at the boundaries at the start of every timestep. I am not adept in programming so would appreciate if anyone could point me in the right direction to read up and carry on from here.
Thanks in advanced. |
|
July 21, 2013, 23:38 |
|
#2 |
Senior Member
Join Date: Jul 2011
Posts: 120
Rep Power: 14 |
I have confirmed that
Code:
vectorField nFPatchVelocity = interpolatorFN.faceInterpolate ( U.boundaryField()[fFPatchID] ); 20 ( (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0.0885345 -6.79536e-08 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) ) I am required to put these dynamic values as boundary condtions to the second part of the solver. I am not sure what I should include for my 0/U file inlet { type ? value ? } Would groovyBC fix this or I need some other methods? Please advise, thanks. |
|
July 22, 2013, 06:48 |
|
#3 |
Member
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 16 |
Hi, haze_1986.
Yes, groovyBC will do the trick. I don't know all of opportunities of groovy, I just tell you the way I would do it. So, we need 3 fields: U_source (mesh1), U_dependent(mesh2), U_helper(mesh2). U_source will be as you like it to be. U_dependent will use groovyBC type at boundary: Code:
type groovyBC; valueExpression "U_helper"; Code:
type calculated; value uniform (0 0 0); Actually, I don't know will or will not numeration of patch faces be the same, so I will use robust method. Code:
label transBC1 = 0; // number of transition boundary in mesh1 label transBC2 = 1; // number of transition boundary in mesh2; number is taken for example forAll(mesh1.boundary()[transBC1]; facei1) { forAll(mesh1.boundary()[transBC2]; facei2) { // If we are talking about same point in space if( mag(mesh1.C().boundaryField()[transBC1][facei1] - mesh2.C().boundaryField()[transBC2][facei2]) < SMALL) { U_helper.boundaryField()[transBC2][facei2] = U_source.boundaryField()[transBC1][facei1]; } } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 07:34 |
How do I use initial velocity by dynamic mesh method? | m_kanani | Main CFD Forum | 0 | June 28, 2011 03:42 |
When the velocity is small, the dynamic mesh doesn't move | li2150 | FLUENT | 0 | January 3, 2011 10:27 |
Mesh motion independent mesh regions | philippose | OpenFOAM Running, Solving & CFD | 12 | August 5, 2008 16:16 |
Changing Mesh Velocity | Anil | CFX | 0 | October 29, 2007 09:47 |