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

Simulating Dam Break problem with icoFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2013, 14:16
Default Simulating Dam Break problem with icoFoam
  #1
New Member
 
Abdul Basit Ahmad
Join Date: Jul 2013
Location: India
Posts: 6
Rep Power: 12
darthcoder is on a distinguished road
I am trying to work through the examples mentioned in the user's guide as a step to understanding the working of openfoam.


As such it occurred to me to try to see if I cannot simulate the dam break problem with only one fluid. That is assuming that there is only one fluid in the simulation domain that is held behind a membrane as shown in the damBreak tutorial.

1. I created a new ribFlow folder in $FOAM_RUN
2. I created the 0, constant, system dictionaries
3. In constant I created polymesh by copying it over from tutorials/interFoam/laminar/damBreak/constant
4. I copied g from the same
5. The transportProperties I created by taking nu from tutorial/incompressible/icoFoam/cavity and rho from the interFoam directory
6. In 0 I had two directories p and U. U I copied directly from interFoam while p I created from the p of icoFoam with the patches of interFoam
7. the system dictionary I simply copied over from the cavity folder.

As expected there are no problems in mesh generation and it happens automatically without errors.

However when I try to run icoFoam, I get a segmentation fault error. I have included the total error message below.

It is quite possible that my understanding is warped. I didn't have a lot of hope that I would manage to sew these two disparate problems and make them gel. But, there is no reason that such a problem shouldn't be tractable with icoFoam.

Kindly tell me how to proceed forward. At the very least I think I can borrow the blockMeshDict, U, g, transportProperties and the system directory and would need to recreate the others. Any advice would be most helpful.

The error message(on executing icoFoam) is displayed below:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.001

Courant Number mean: 0 max: 0
DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::operator/(Foam::tmp<Foam::Field<double> > const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::fixedFluxPressureFvPatchScalarField::updateC oeffs() in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 at gaussLaplacianSchemes.C:0
#7 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#8 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#9 Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#10
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/icoFoam"
#11
at icoFoam.C:0
#12
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/icoFoam"
#13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#14
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/icoFoam"
Segmentation fault
darthcoder is offline   Reply With Quote

Old   August 27, 2013, 04:47
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Let's disregard the simulation aspect for now - how would you reproduce this experiment in real life?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   August 27, 2013, 05:11
Default
  #3
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Abdul,

what you are thinking is water and void right? This feature will be highly beneficial for OpenFOAM, as in certain cases we could disregard the air phase while simulating water with VOF.

There is a problem with your set-up and this is that void should be taken a phase, so you are bound to run it with interFoam. However, this solver does not allow "void" simulation, as zero-density fluids cause a division by 0.

From my experience it would be very difficult to modify the solver for this purpose, but it will be a very interesting advance.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 27, 2013, 14:41
Question
  #4
New Member
 
Abdul Basit Ahmad
Join Date: Jul 2013
Location: India
Posts: 6
Rep Power: 12
darthcoder is on a distinguished road
Quote:
Originally Posted by akidess View Post
Let's disregard the simulation aspect for now - how would you reproduce this experiment in real life?

sorry for my late response i spent a lot of time wondering about this.

seems to me i was just trying to brute force a solver onto a physical problem without considering it in any sort of detail.

now it seems pretty straightforward to me to consider that the "rest of the space" would be filled with air(at atmospheric pressure most probably) and thus it is necessary to do a two phase solution and hence use interFoam, thus having to do the problem as it is attempted in the user guide. since it is already solved in a demo, there isn't really much for me to do except change some parameters and see what effects that causes.

on further deliberation i have two questions that i would like to ask you:

1. where is the software breaking down? what is causing the segfault? i cannot read c++(yet) so i cannot debug it.

2. suppose the whole region was filled with water at rest and at t=0 it is given some momentum(say by opening a membrane to the very right of the flow field while simultaneously pushing it with a piston on the opposite end) how do i go about solving this problem? what boundary conditions do i use?

thank you.
darthcoder is offline   Reply With Quote

Reply

Tags
dambreak, icofoam, interfoam

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in simulating turbine blade with periodic BC scl641 FLUENT 1 January 18, 2011 19:23
BROKEN DAM PROBLEM Valdemir Ferreira Main CFD Forum 2 June 9, 2005 07:11
Velocity scale for Broken Dam Problem Valdemir Ferreira Main CFD Forum 0 June 3, 2005 09:01
Initial conditions for dam break... Gustaf Mårtensson CFX 1 April 22, 2002 19:46
Dam break // wet bed Mehdi BEN ELHADJ Main CFD Forum 4 August 24, 2000 08:39


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