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

Problems implementing a boundary condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 17, 2007, 13:22
Default Hello, I am trying to imple
  #1
Super Moderator
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 115
Rep Power: 8
ogloth is on a distinguished road
Hello,

I am trying to implement a custom boundary condition. The class has a member field like this:

scalarField foo;

When reading from the dictionary it gets initialised with the correct values, but the first time that updateCoeffs() is called the field foo is reverted back to all zeros ...

Another question about boundary conditions: What exactly are the mapping functions doing?

Any help would be appreciated!

Thanks,
Oliver
ogloth is offline   Reply With Quote

Old   July 17, 2007, 13:44
Default Another question about bound
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Quote:
Another question about boundary conditions: What exactly are the mapping functions doing?
On change of topology, the boundary condition needs to map itself from the old to the new mesh. Since on the outside we don't know what data the boundary condition holds, it needs to map itself.

Clear?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 17, 2007, 14:46
Default Yep, that makes sense - for no
  #3
Super Moderator
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 115
Rep Power: 8
ogloth is on a distinguished road
Yep, that makes sense - for now I copied that part from the total pressure condition.

'still trying to find why it is reset to zero, though.
ogloth is offline   Reply With Quote

Old   July 17, 2007, 15:36
Default I checked and the instance of
  #4
Super Moderator
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 115
Rep Power: 8
ogloth is on a distinguished road
I checked and the instance of my boundary condition that gets used has not been constructed with the constructor that takes a dictionary as argument. Actually it was constructed with:

className(const fvPatch&, const scalarField&)

Did I forget to overload a copy-operator or something in that league? I checked the total-pressure boundary condition, but there is no copy operator

...

I'm stuck :-(
ogloth 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
Implementing new oscillating boundary condition chbenz OpenFOAM Running, Solving & CFD 0 February 19, 2009 03:27
Implementing a New Boundary Condition cliffoi OpenFOAM Running, Solving & CFD 8 February 11, 2008 13:11
Implementing PseudoMass Transfer Boundary Condition rsungkorn OpenFOAM Running, Solving & CFD 0 February 11, 2008 08:28
Problems with Fan boundary condition Nish FLUENT 2 August 27, 2004 18:27
Implementing boundary condition for LES Linfeng BI Main CFD Forum 2 December 9, 2002 09:58


All times are GMT -4. The time now is 10:36.