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

Modify simpleFoam on os x

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2018, 13:15
Default Modify simpleFoam on os x
  #1
New Member
 
Join Date: Mar 2016
Posts: 11
Rep Power: 10
slaners is on a distinguished road
Hi all,

I need to modify simpleFoam to add energy equation. The problem is I am running openFoam on os x and it is encapsulated in an image used by docker.
I assume adding the equation and corresponding fields won't be too hard once I have access to the solvers folder.
Has anyone managed to do it before ?

Thank you in advance !
slaners is offline   Reply With Quote

Old   July 17, 2018, 12:21
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
There should already be a version of simpleFoam with the energy equation -- buoyantSimpleFoam. Here's a link to the solver files for OF dev : https://github.com/OpenFOAM/OpenFOAM...yantSimpleFoam.

Caelan
clapointe is offline   Reply With Quote

Old   July 17, 2018, 13:15
Default
  #3
New Member
 
Join Date: Mar 2016
Posts: 11
Rep Power: 10
slaners is on a distinguished road
Hi Caelan,

Thanks for the answer. Sorry but I should have specified my case : circular pins between two plates placed in an incoming flow, this flow is not driven by buoyancy. I already tried with rhoSimpleFoam but it turns out to be very unstable when I use the k-omega SST turbulence model. However, I managed to get a stable solution with simpleFoam and therefore would like to add temperature to this solver.
slaners is offline   Reply With Quote

Old   July 17, 2018, 13:19
Default
  #4
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
I'm not sure modifying simpleFoam is the answer then -- the product would essentially be a duplicate of rhoSimpleFoam. Have you tried other turbulence models with rhoSimpleFoam? Will it run without any turbulence modeling?

Caelan
clapointe is offline   Reply With Quote

Old   July 17, 2018, 13:23
Default
  #5
New Member
 
Join Date: Mar 2016
Posts: 11
Rep Power: 10
slaners is on a distinguished road
Yes it worked with k-epsilon. I get messages errors involving compressible turbulence modeling with k-omega SST, that is why I tired to switch to an incompressible solver.
slaners is offline   Reply With Quote

Old   July 17, 2018, 13:25
Default
  #6
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
Ok -- I misunderstood. What about trying buoyantBoussinesqSimpleFoam? Just set gravity to be the zero vector.

What errors are you getting when using kOmegaSST?

Caelan
clapointe is offline   Reply With Quote

Old   July 17, 2018, 14:14
Default
  #7
New Member
 
Join Date: Mar 2016
Posts: 11
Rep Power: 10
slaners is on a distinguished road
I will try buoyantBoussinesqSimpleFoam.
The error message I get is :

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5 ? at ??:?
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 ? at ??:?
Floating point exception
slaners is offline   Reply With Quote

Old   July 17, 2018, 14:30
Default
  #8
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
Looks like the temperature went out of the range the sutherland coefficients are good for -- I'd also make sure your case is set up correctly for using kOmegaSST. A quick scan of the tutorials revealed this as an example : https://github.com/OpenFOAM/OpenFOAM...rofoilNACA0012. You could also check your fvSchemes file against the one used in this tutorial.

Caelan
clapointe is offline   Reply With Quote

Old   July 18, 2018, 11:01
Default
  #9
New Member
 
Join Date: Mar 2016
Posts: 11
Rep Power: 10
slaners is on a distinguished road
Thanks ! I used the tutorial you sent me to modify my case and it is now working ! I think that this is mainly due to the Temperature limiter in the fvOptions file.
Thanks again !!
slaners is offline   Reply With Quote

Reply

Tags
docker-toolbox, mac os x, openfoam 5.x, simplefoam second order


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 16:26
simpleFoam parallel solver & Fluent polyhedral mesh Zlatko OpenFOAM Running, Solving & CFD 3 September 26, 2014 07:53
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 10:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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