CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Setting a boundary condition on both sides of a surface

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2016, 21:33
Default Setting a boundary condition on both sides of a surface
  #1
Member
 
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 10
STutexas is on a distinguished road
Hi

I am using Gmsh to create a geometry that is a cube with a sphere in it. I would like to set a zero gradient BC on the inner surface of the sphere and fixed value BC on the outer surface of the sphere. The outer surfaces of the cube will have fixed value BC here.

But when I create the geometry and input it in openfoam using gmshtofoam, openfoam does not recognize the surface as 2 different boundaries and does not let me set these 2 boundary conditions. Please let me know how I could achieve that.

My .geo file is attached for reference if you want to peruse it.

Thank you.
STutexas is offline   Reply With Quote

Old   April 7, 2016, 12:46
Default
  #2
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,

I don't know what exactly you are trying to achieve, but you probably just need to create a baffle after importing your mesh to OpenFOAM. It's pretty easy, just check out the createBaffles utility to get started.

And if you're doing multi-region stuff, then you'll probably need to use the splitMeshRegions tool. There are loads of examples both in the tutorials and online for this, so it should be straight forward to adapt them to your case.

Good luck!

Kind regards,
Peter
opedrofunk is offline   Reply With Quote

Old   April 8, 2016, 01:00
Default
  #3
Member
 
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 10
STutexas is on a distinguished road
Hi

Thank you for the help. I was able to create the baffles and run my case. But I am getting an error.

After creating my baffles I get this warning.
'
--> FOAM Warning :
From function createBaffles
in file createBaffles.C at line 773
Setting field on boundary faces to zero.
You might have to edit these fields.

How do I edit the fields. Do I need to use map fields?
Thank you for the help.

Saurabh
STutexas is offline   Reply With Quote

Old   April 11, 2016, 15:06
Default
  #4
Member
 
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 10
STutexas is on a distinguished road
I have been able to sort the problem by redefining the values of the fields in the initial file. Now I have to set different initial values of field variable for different cellSets. I tried using setFields and funkySetFields but both approaches failed. Do you have any ideas on how I could do that.

Thanks again for all the help.

Saurabh
STutexas is offline   Reply With Quote

Old   April 11, 2016, 15:24
Default
  #5
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,
I'm not 100% sure what the issue is, but it sounds like you just need to run a changeDictionary to set the patch types, boundary type, and values for the baffles you've created?
Kind regards,
Peter
opedrofunk is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56


All times are GMT -4. The time now is 21:54.