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

Numerical errors in nested domain with pre-calculated boundary values

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2012, 13:11
Default Numerical errors in nested domain with pre-calculated boundary values
  #1
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Hi all,

I have a 'little' problem with (what I guess) numerical errors in my simulations. In order to save computational time I'm right now trying to set up a nested domain, i.e. a small "cut-out" part of a global, large domain is modeled as an own domain using pre-calculated boundary conditions from the large one.

In the first step, the flow (e.g. water waves, plus structure) is solved in the large domain. At the boundary locations of the small domain, values of U, pd, k, omega and nut are stored using sample tool (plane). These values are then used as boundary values for the small domain (four side walls plus top), by a direct mapping of face values within a modified interFoam solver every time step. The points/cells in the small domain are exactly the same as in the area within the large one, so no spatial interpolation is undertaken.

Coming to the problem:
The boundary mapping and time-interpolation itself works fine, the calculation within the small domain does not. Looking at attached pictures one can see the boundary values for Umag (left) and the internalMesh for Umag (middle) at the same time step, as well as for Ux (right, different time). Obviously, something goes really wrong here. There is a strange "cross pattern": Values have opposite signs and very large values in neighboring cells e.g. in the outlet cell corners. So I guess either my settings are not correct, or the way boundary values are modified is not correct. The latter is done within the modified interFoam solver in the time loop right before the UEqn (and afterwards pEqn) is solved.
Furthermore, residuals for k and omega never fall below 0.01. Dicts for fvscheme and fvsolution are attached.

Any hints on whats wrong are highly appreciated!

Arne



Attached Files
File Type: txt fvSchemes.txt (1.7 KB, 3 views)
File Type: txt fvSolution.txt (3.4 KB, 2 views)

Last edited by Arnoldinho; April 4, 2012 at 04:25. Reason: Additional information
Arnoldinho is offline   Reply With Quote

Old   April 4, 2012, 09:40
Default
  #2
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Hi again,

cane someone at least say if the above described procedure, i.e. having a domain and giving fixed (but time-varying) boundary values for all four sides plus the top patch of the domain is generally possible, or if I walked right into one of the numerous numerical/mathematical traps?
I further investigated this and got similar, faulty results even for simple test cases with uniform velocity inflow.

Thanks,
Arne
Arnoldinho is offline   Reply With Quote

Old   April 4, 2012, 11:18
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Arne

I have two possible explanations, which depends slightly on the details, and you will be able to check the correctness using a laminar solution:

1. If you are using U from the large to the small domain: In that case you are using a velocity field, which does not conserve mass! On collocated grids as in OpenFoam, mass conservation is enforced through the face fluxes, so if you prescribe a boundary value all the way around for U, then mass conservation fails.

2. If you are using face fluxes between the two grids: In that case you might have forgotten to take the direction of the normal vectors into account, i.e. you are not conserving mass.

Furthermore, if you are also pre-scribing values for the pressure on the boundaries, then you have an extremely stiff system, hence I would suggest pressure dirichlet when the flux is outward and neumann when inward. Virsa virsa for the velocities.

Hope it helps

/ Niels
ngj is offline   Reply With Quote

Old   April 4, 2012, 11:31
Default
  #4
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Hi Niels,

thanks for your suggestions. In facts its number 1 right now. I also had the mass conservation problem in mind and therefore tried zeroGradient at the outlet, which gave slightly better results. The main problem seems to be the boundary condition at the top, which is somewhere "in the middle" of the large domain, more specific in the water region only.
So I think I will shift my top boundary up again and think of making the system less stiff.

Thanks,
Arne
Arnoldinho is offline   Reply With Quote

Reply


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
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 18:15
Solver error message!!! IoSa CFX 1 September 14, 2006 05:48
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 09:59


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