# Set boundary value of 1 field equal to another field

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

 October 27, 2016, 14:45 Set boundary value of 1 field equal to another field #1 Senior Member   Saideep Join Date: Apr 2015 Location: INDIA Posts: 174 Rep Power: 4 Sponsored Links Hi guys; I am using modified interFOAM solver(Foam-extend 1.6) where I split total pressure(p) into two parts: pd(dynamic pressure) and pc(capillary pressure). So, p = pd + pc. I calculate pc from the surface tension force term equation (surface tension*interface curvature*dirac). Later I compute p from the NSE (in pEqn.H). As I am solving for both the variables I need boundary conditions for both variables pd and pc with ideal case being a zeroGradient for pc (specifying a pcRefCell and pcRefValue) and pd = -pc in order to obtain a fixed value for the total pressure (I would like to have p = 0 at inlet and outlet face boundaries). Can anyone direct me how can I set "pd = -pc" at the inlet and outlet faces in the 0 file? Thanks.

 October 28, 2016, 01:34 #2 Senior Member   Join Date: Aug 2013 Posts: 292 Rep Power: 6 Hi, Have you looked at groovyBC? That allows you to set your BC to a custom condition/value. Cheers, Antimony

 October 31, 2016, 09:39 #3 Senior Member   Adhiraj Join Date: Sep 2010 Location: Maryland, United States Posts: 104 Rep Power: 8 Are you solving PDEs for p, pc and pd--all three of them? Would that not be a problem?

 October 31, 2016, 10:58 #4 Senior Member   Saideep Join Date: Apr 2015 Location: INDIA Posts: 174 Rep Power: 4 Hi Adhiraj, interFOAM as it is, is not a balanced force model. (that is the capillary pressure gradient and surface tension force do not balance each other leading to spurious currents). So, the way poreFOAM (code from Imperial College by Raeini.et.al.) capillary pressure (pc) is computed as follows: laplacian (pc) = divergence (surface tension force), from found value for pc we try to compute the flux and remove it from the flux due to surface tension. In ideal case it should be 0 but due to interpolations and all it isn't so we try to filter some spurious fluxes generated by a percentage value. Similar to interFoam, we solve for the dynamic pressure (NSE in pEqn.H) and the total pressure is the sum of computed capillary pressure (pc) and dynamic pressure (pd). Saideep

 Tags boundary variable, split p for 2phase flow

 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 thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57 mpeppels CFX 10 June 16, 2015 15:48 RandomUser OpenFOAM Meshing & Mesh Conversion 5 March 2, 2015 18:19 Anna Tian CFX 1 June 16, 2013 06:28 happy CFX 14 September 6, 2012 01:54