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

not solve all components of a vector (velocity)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 6, 2013, 12:01
Default not solve all components of a vector (velocity)
  #1
Member
 
Join Date: Nov 2012
Posts: 57
Rep Power: 4
Henning86 is on a distinguished road
hi,


im currently running an axisymmetric case (1 cell thick). But all Direction of the velocity are solved, which results in the problem that i need longer calculation times and the Uz compoent are calculated wrong.

the wrong solution of the Uz direction should affect the solver accuarcy.

They could simply be set to zero(i know how to do this). it would be way more elegant to simply not solve in the z-direction so valueable calculation time could be saved.

My only approach for now is (that a haven't test yet) to manipolate the fvmesh.SolutionD and fvmesh.geometricD. Both of those function are const so i could manipolate them with a pointer over another variable.

The problem here is i don't know where these functions are used as well.

Does anyboy know if there is a more elegant approach?



Best regards

Henning
Henning86 is offline   Reply With Quote

Old   May 6, 2013, 14:09
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
OpenFOAM already has in built ways to deal with 2D problems. Did you set your boundaries on the front and back to "empty" and your axis to "axis"?
mturcios777 is offline   Reply With Quote

Old   May 6, 2013, 17:22
Default
  #3
Member
 
Join Date: Nov 2012
Posts: 57
Rep Power: 4
Henning86 is on a distinguished road
thanks for the response

the frontSide and backSide are declared as wedge and the axis is declared as empty. But the axis has no faces. But if i dont delete the faces (collapseEdge) and set the boundary condition of the axis to empty. OpenFoam calculates Ux and Uz but not Ux and Uy.

is there a boundary conditions called axis?
Henning86 is offline   Reply With Quote

Old   May 6, 2013, 19:55
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
Sorry, I was inaccurate. The boundary condition you should use is "symmetryPlane" (see the movingCone tutorial in for pimpleDyMFoam). Also, how are your coordinate planes oriented?
mturcios777 is offline   Reply With Quote

Old   May 7, 2013, 03:56
Default
  #5
Member
 
Join Date: Nov 2012
Posts: 57
Rep Power: 4
Henning86 is on a distinguished road
sadly that doesn't solve the problem.its 3D after all and there are really slow velocity in the Uz direction after some times steps.

In my probelm theses begin to add up after 500000 iteration the can't be neglected anymore. Definition of a 2D mesh is made in the class polymesh. It can only be 2D if the BC empty and wedge are used. i think


Is there some solver option in the fvsolution dict to block one direction?
Henning86 is offline   Reply With Quote

Old   May 7, 2013, 08:12
Default
  #6
Member
 
Join Date: Nov 2012
Posts: 57
Rep Power: 4
Henning86 is on a distinguished road
it works:


you can say the solver to not solve on set of equation by typing this

Code:
 
 
 Vector<label>& geoP = const_cast<Vector<label>&>(mesh.geometricD());
   geoP.x()=1;
   geoP.y()=1;
   geoP.z()=-1;
 
    Vector<label>& solP = const_cast<Vector<label>&>(mesh.solutionD());
   solP.x()=1;
   solP.y()=1;
   solP.z()=-1;
The solution is a work around to save time. but is in the end not very accurate. The proper way should be to create a new BC and modify the polymesh so it recognizes 2D axisymmetric cases.

PS hope that solution doesn't cause some major troubles.
Henning86 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
solve equation michaelsmit OpenFOAM Running, Solving & CFD 4 March 24, 2011 06:35
Solve Flow or VOF simultaneously ? Ramsey FLUENT 1 February 16, 2011 14:16
Linearized NS euqations: how to solve them?(problem with Matrix operations..) matteoL OpenFOAM Running, Solving & CFD 0 November 18, 2009 07:58
Using Compressible Solver (sonicFoam) to solve subsonic flows ezsoal OpenFOAM 0 October 27, 2009 10:13
MAC method solve for pressure at boundry Ron Main CFD Forum 2 January 28, 2006 03:14


All times are GMT -4. The time now is 11:33.