Table defined BC

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

 March 15, 2012, 14:32 Table defined BC #1 Senior Member   Daniele Vicario Join Date: Mar 2009 Location: Novara, Italy Posts: 142 Rep Power: 10 Is it possible to define a patch using its caracteristic data ? For example, on an outlet we could know the p/U relation: p=0.1bar ---> U=0.1l/s p=0.5bar ---> U=0.4l/s p=1.0bar ---> U=0.7l/s .... It would be usefull in complex system. You can avoid simulating external part already characterized. Can this be implemented ? Daniele

 March 15, 2012, 14:58 #2 Senior Member   Daniele Vicario Join Date: Mar 2009 Location: Novara, Italy Posts: 142 Rep Power: 10 Sorry to make questions before deep searching. I think the best thing is to use groovyBC in following way. Let's say we approximate the p/U relation with: U=p/10+5 (note: just a random linear relation) and the outlet flow is just in the x direction, then: For 0/U: Code: ```outlet { type groovyBC; variables "Ux=p/10+5"; valueExpression "vector(Ux,0,0)"; value uniform (0 0 0); }``` Is it correct ? Is there a better way ? Is there any stabilty problem ? Daniele

March 15, 2012, 15:38
#3
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,045
Rep Power: 43
Quote:
 Originally Posted by danvica Sorry to make questions before deep searching. I think the best thing is to use groovyBC in following way. Let's say we approximate the p/U relation with: U=p/10+5 (note: just a random linear relation) and the outlet flow is just in the x direction, then: For 0/U: Code: ```outlet { type groovyBC; variables "Ux=p/10+5"; valueExpression "vector(Ux,0,0)"; value uniform (0 0 0); }``` Is it correct ? Is there a better way ? Is there any stabilty problem ? Daniele
Specifying the velocity on the outlet is always a bit problematic but if you leave it another boundary with a Neuman-condition you might be fine

In the variables-string a ; is missing

The valueExpression might be more elegant if you write it like "Ux*normal()". That way it works no matter how the boundary is oriented (not 100% sure. You might night a - there)

Concerning your original posting: expressions in swak4Foam can have lookup-tables where you specify a function by value pairs and values are interpolated between these. For an exmple on the usage see the wobbler-case in the examples

 March 15, 2012, 15:40 #4 Senior Member     mauricio Join Date: Jun 2011 Posts: 141 Rep Power: 10 it's hard, at least of me, to say.. but is your simulation ss or transient? i kinda of a need a very specific reason b4 implementing things.. so i can't tell.. as for stability.,, i guess you cannot fix pressure and flowrate, U, at the same patch and model.... so i guess you got pick one var to fix.. __________________ Best Regards /calim "Elune will grant us the strength"

 March 15, 2012, 17:17 #5 Senior Member   Daniele Vicario Join Date: Mar 2009 Location: Novara, Italy Posts: 142 Rep Power: 10 Many thanks ! Sure, I know fixing an outlet U is problematic. I'll make some simple bc tests and report here. daniele

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post llrr ANSYS Meshing & Geometry 14 February 12, 2017 14:44 jaswi OpenFOAM Programming & Development 3 October 29, 2015 14:42 asaijo OpenFOAM Installation 9 April 6, 2011 12:21 hjasak OpenFOAM Installation 70 September 24, 2010 05:06 furkan Siemens 0 April 4, 2006 10:23

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