CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Incompatibility between Custom BC and ParaFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2010, 12:44
Default Incompatibility between Custom BC and ParaFoam
  #1
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi all

I have made a custom boundary condition, where I need the effective viscosity (nuEff) from any given turbulence model to specify the gradient of some field at the boundary. This is working satisfactory during computations, however as nuEff is only available during the computations and I feel reluctant to write the entire field, paraFoam crashes when I am trying to load the field using that specific boundary condition, as it evaluates the boundary conditions and is unable to find nuEff.

Up to now I have tried the following:
1. try-catch in my BC (not beautiful), however it seems that OpenFOAM aborts upon reading fields, hence the try-catch was unsuccessful/overruled.
2. I have considered using the headerOk, though I have not been successful in implementing the procedure.
3. Make a script which changes zeroSedimentFlux (my BC-type) type with zeroGradient type whenever I need to visualize and vise-versa when I need to make computations. This would work, however I would like to have a more general method.

Any help is greatly appreciated.

Bests,

Niels
ngj is offline   Reply With Quote

Old   January 22, 2010, 04:12
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by ngj View Post
I have made a custom boundary condition, where I need the effective viscosity (nuEff) from any given turbulence model to specify the gradient of some field at the boundary. This is working satisfactory during computations, however as nuEff is only available during the computations and I feel reluctant to write the entire field, paraFoam crashes when I am trying to load the field using that specific boundary condition, as it evaluates the boundary conditions and is unable to find nuEff.
From your description, I assume that you have compiled your custom boundary condition as a library and have it in $FOAM_LIBBIN, which is where paraview is finding it (via the PV_PLUGIN_PATH, which is set in etc/apps/paraview3/bashrc).

If you can make sure that your custom boundary condition is NOT found by paraview, your problem should disappear. The paraview reader code should then fallback to the "generic" patch, which only needs the values on the patch but not other information.

There are several ways to keep your custom boundary condition from being found:
  1. compile bc into FOAM_SITE_LIBBIN or FOAM_USER_LIBBIN.
  2. compile bc directly into your solver.
Note that the FOAM_SITE_LIBBIN (and FOAM_SITE_APPBIN) scheme was added in 1.6.x for exactly that purpose: a central place for site-wide libraries and applications that is separate from the main OpenFOAM installation.
olesen is offline   Reply With Quote

Old   January 22, 2010, 05:54
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Mark

Thank you very much. I took on approach (2) and compiled the boundary condition directly into the solver, as it is very solver specific anyway, and now solving, visualizing and e.g. sampling runs smoothly without any problems.

Have a nice weekend,

Niels
ngj is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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



All times are GMT -4. The time now is 03:32.