|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
deok-kyu choi
Join Date: Feb 2012
Location: Rep. of Korea
Posts: 12
Rep Power: 3 ![]() |
Dear all,
I'm trying to calculate coriolis force. I've already made the mesh in constant dir. There are two cellzones, cellTable_1(fluid region), cellTable_2(fluid region with rotating) How can I calculate the Radius for only cellTable_2? running following code, the coriolis force is calculated in every cells. I guess just modifying mesh.C() to mesh in cellTable_2 in volVectorField Radius. can anyone help on this issue? Give me a great idea for solving ![]() Thank you all. ================================================== ============= Here is the my code. #include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" forAll(mesh.cellZones(), i) { const cellZone& zone = mesh.cellZones()[i]; if (zone.name()=="cellTable_2") { const labelList& cellLabels = mesh.cellZones()[i]; Info << "Found matching zone " << zone.name() << " with " << cellLabels.size() << " cells." << endl; dimensionedVector Omega ( "Omega", dimensionSet(0, 0, -1, 0, 0, 0, 0), //RPM 10 rad/s vector(0, 10, 0) ); // Define centor of rotating frame dimensionedVector Origin ( "Origin", dimensionSet(0, 1, 0, 0, 0, 0, 0), point(0.0, 0.0, 0.0) ); volVectorField Radius = (mesh.C() - Origin); // Calculate the coriolis force in entire cells volVectorField Fcoriolis IOobject ( "Fcoriolis", runTime.timeName(), mesh ), Omega ^ Radius ); Fcoriolis.write(); } } return 0; } |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2D Mesh Generation Tutorial for GMSH | aeroslacker | Open Source Meshers: Gmsh, Netgen, CGNS, ... | 12 | January 19, 2012 03:52 |
| OpenFOAM 1.7.0 Released | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 1 | May 26, 2011 03:09 |
| OpenFoam 1.7.0 on RHEL 4.6 | Pankaj Singh | OpenFOAM Installation | 12 | October 24, 2010 20:04 |
| Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 06:25 |
| OpenFOAM 14 parallel troubles | msrinath80 | OpenFOAM Running, Solving & CFD | 14 | July 5, 2007 04:51 |