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

BC in openFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 22, 2010, 16:24
Default BC in openFoam
  #1
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
hi dear foamer
how i can use a value in a file as my boundary condition ?
for example for patch inlet for pressure i want that boundary in inlet change as i change the value of pSat in constant directory transporperties file:
inlet {
type fixedValue;
value $FOAM_CASE/constant/transporperties/pSat;
}
nimasam is offline   Reply With Quote

Old   August 23, 2010, 15:12
Default
  #2
New Member
 
Dominic Piro
Join Date: Dec 2009
Location: South Kingstown, RI
Posts: 11
Rep Power: 6
djpiro is on a distinguished road
Quote:
Originally Posted by nimasam View Post
hi dear foamer
how i can use a value in a file as my boundary condition ?
for example for patch inlet for pressure i want that boundary in inlet change as i change the value of pSat in constant directory transporperties file:
inlet {
type fixedValue;
value $FOAM_CASE/constant/transporperties/pSat;
}
Hello,

I have made a few of my own BC's in foam that read in data from files. You can use input file streams (IFStream class) to read in files. I got the original code I use from $FOAM_SRC/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SKA/SKA.C, so I suggest that as a starting point. I do not know if this would be the most ideal option for you, but I'm sure you could get it to work.

I hope this helps,

Dominic
djpiro is offline   Reply With Quote

Old   August 25, 2010, 02:43
Default
  #3
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 6
aloeven is on a distinguished road
Did you take a look at the user manual section 4.2.9?

There it is exactly explained how to use a value from a file. For an example, take a look at the motorBike tutorial of simpleFoam.
aloeven is offline   Reply With Quote

Old   August 29, 2010, 21:45
Default
  #4
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
yep u are right but i would like to read a value from an existing dic for example transportproperties dic not from a file in directory 0
nimasam is offline   Reply With Quote

Old   August 29, 2010, 23:41
Default
  #5
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Nima,

Just a wild guess, I think you need a boundary data file like the one in pimpleFoam. Or you can input some forAll and if else command directly in your solver...

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   September 1, 2010, 17:47
Default
  #6
New Member
 
Abdel
Join Date: Jul 2010
Posts: 28
Rep Power: 6
bruxellois4 is on a distinguished road
Dear Foamer!!

how i can define a variable (non constant) boundary condition (pressure inlet),for example for patch total pressure i want that boundary in inlet changes at every iteration step, i have value in files which come from real test.

Any idea please!


Best regards.
bruxellois4 is offline   Reply With Quote

Old   September 1, 2010, 23:29
Default
  #7
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Abdel,

Please find this discussion
Transient boundary conditions

Otherwise, if the properties you want to vary with time is not a volScalarField (NO_READ in createFields.H) then you can do based from my previous post.

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   October 28, 2011, 18:48
Default continuity BC
  #8
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 4
deifobe is on a distinguished road
hi,
I am new to OpenFoam, does anybody know how to set a continuity BC in OpenFOAM?
Thanks in advance
deifobe is offline   Reply With Quote

Old   October 29, 2011, 03:54
Default
  #9
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
where do u need continuity boundary condition?
which solver do u talking about and which variables?
nimasam is offline   Reply With Quote

Old   October 30, 2011, 10:54
Default
  #10
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 4
deifobe is on a distinguished road
thanks for reply, i use interFoam to simulate the droplet break-up in a t-junction
and i need continuity BC(for pressure,velocity and alpha1) for the patch between vertical and horizontal arm because i tried to merge (with mergePathPairs) the two blocks but the simulation result not is what is expected: changing several BC i obtain that the fluid stop at this patch or a continuous flow.
deifobe is offline   Reply With Quote

Old   October 30, 2011, 12:29
Default
  #11
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
are you sure your problem is the boundary condition between horizontal and vertical patches? i think you have done the right work yet and using merge patches to merge two blocks i think its better to open a new thread and put some of ur result and what you are expecting from result in it! different issues from mesh resolution or solver limitation or overall conditions or initial conditions cause your problem! and it think here the patch issue is not ur problem
nimasam is offline   Reply With Quote

Old   November 3, 2011, 00:00
Default
  #12
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 4
deifobe is on a distinguished road
Ok,thanks a lot for your advice
deifobe is offline   Reply With Quote

Old   July 6, 2013, 16:35
Default
  #13
Member
 
subhendu
Join Date: Jun 2013
Location: kolkata,india
Posts: 35
Rep Power: 3
subhsngh is on a distinguished road
hi,
can u tell me how to write partial velocity differential condition for outlet
subhsngh is offline   Reply With Quote

Reply

Tags
boundary condition, read from file

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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 17 August 22, 2009 03:59
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 13:49.