|
[Sponsors] |
August 23, 2012, 08:37 |
Boundary Condition and U-field
|
#1 | ||
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 13 |
From a boundary condition I would like to access for example the velocity field. I try like that:
Quote:
Quote:
|
|||
August 23, 2012, 09:29 |
|
#2 |
Senior Member
|
I usually use
Code:
const fvPatchField<vector>& foo = patch().lookupPatchField<volVectorField, vector>("U"); Jens |
|
August 23, 2012, 09:42 |
|
#3 |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 13 |
Thanks for your answer! I use a modified 'fixedValue' BC added to a solver. I tried 100 different versions for accessing U, but nothing worked. It's always the same error -> no idea why :-(
A good explanation how to access fixed dict entries: http://albertopassalacqua.com/?p=947 |
|
August 24, 2012, 02:20 |
|
#4 |
Senior Member
|
What exactly do you mean by "added to a solver"? Did you compile the boundary condition into the executable of a solver?
|
|
August 24, 2012, 02:28 |
|
#5 | |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 13 |
Yes, that's what I did! Linking a BC directly to a solver is possible by compiling BC and Solver together (Make/files):
Quote:
|
||
August 24, 2012, 02:57 |
|
#6 |
Senior Member
|
I know how this should work in principle, but I would very much like to avoid it. Since one might want to use the BC with a different solver as well. But I guess that this is a matter of choice .
It doesn't compile at the moment, right? Have you checked your line for incorrect chars (resulting from copying code from somewhere else, e.g. the internet)? |
|
August 26, 2012, 17:37 |
|
#7 |
Member
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 13 |
Yes, I checked for incorrect characters. And I tried different ways of access (db.lookup; this->patch.lookup; etc.).
First, I thought using fixedValue as basis because I know very well how it works. But as I want to use the BC only for Temperature I thought later that it might be better to use some scalar BC (fixedValue can be scalar or vector). So I took wallHeatTransfer and modified that. I had to investigate again to understand how it works, but here I did no face any problems. --> The problem it not solved, but I found a working solution. Thank you!!! |
|
August 27, 2012, 03:55 |
|
#8 |
Senior Member
|
I see. Do you mind sharing your workaround? Maybe others run into the same issue as well.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Field value inside a boundary condition class | pcaron | OpenFOAM Programming & Development | 14 | October 17, 2022 09:40 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 06:49 |
vorticity boundary condition | bearcharge | Main CFD Forum | 0 | May 14, 2010 11:32 |
Boundary condition vector field gradient from two sides of patch face | quba | OpenFOAM | 0 | December 12, 2007 05:26 |
Slip boundary condition what is inside | normunds | OpenFOAM Running, Solving & CFD | 2 | June 4, 2007 06:45 |