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

BubbleInterTrackFoam with surfactant

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 18, 2013, 07:47
Unhappy BubbleInterTrackFoam with surfactant
  #1
New Member
 
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 4
amattosc is on a distinguished road
Hi everyone,

I was hoping to get some help here about this solver.

I've tried to run the original tutorial "bubble2D_r0.75mm" and it worked fine, but I noticed that the option "cleanInterface" was set as "Yes" in "freeSurfaceProperties".

I've looked into the code and for what I understood with this option enabled, BubbleInterTrackFoam doesn't solve the surfactant's conservation equation (as expected).

So, I've tried to change this option to "No" with the add of "soluble yes" at the end of "freeSurfaceProperties". I've also added an initial field for the concentration of surfactant as a "volScalarField".

The result was the following error:

"--> FOAM FATAL IO ERROR:
cannot open file

file: /home/amanda/OpenFOAM/amanda-1.6-ext/run/tutorials/surfaceTracking/bubbleInterTrackFoam/bubble2D_r0.75mm-teste/1e-05/Cs at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 62.

FOAM exiting"

I've tried to locate where the solver tries to read Cs and found its declaration in the middle of "freeSurface" in the file "makeFreeSurfaceData.C":

"surfactConcPtr_ = new areaScalarField
(
IOobject
(
"Cs",
DB().timeName(),
mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
aMesh()
);"

But at this point the solver had already entered the time loop and was trying to read from a file that has not been created yet.

It might be a silly mistake because I'm a new user of OpenFoam, but could someone give me a hand?

Thanks in advance.

Amanda Mattos
amattosc is offline   Reply With Quote

Old   March 18, 2013, 14:16
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Create the file yourself to specify the initial surfactant distribution.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   March 18, 2013, 18:24
Default
  #3
New Member
 
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 4
amattosc is on a distinguished road
Quote:
Originally Posted by akidess View Post
Create the file yourself to specify the initial surfactant distribution.
Thanks for the answer but as I said in my previous post I've already created this file.

The problem is that the solver tries to read this concentration after it started the time loop so the concentration for time 0 exists but for the next time 1e-5 it doesnt.

Any more ideas?
amattosc is offline   Reply With Quote

Old   March 19, 2013, 02:44
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Ah, yes. You said you created a volScalarField though, whereas what you need is an areaScalarField?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   March 19, 2013, 06:14
Default
  #5
New Member
 
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 4
amattosc is on a distinguished road
Quote:
Originally Posted by akidess View Post
Ah, yes. You said you created a volScalarField though, whereas what you need is an areaScalarField?
I've tried to create a Cs file as an areaScalarField but it didn't work anyway.
amattosc is offline   Reply With Quote

Old   September 22, 2014, 12:21
Default
  #6
New Member
 
Chiara
Join Date: Oct 2012
Posts: 9
Rep Power: 4
Chia is on a distinguished road
Hi Amanda,

I have the same problem with bubbleInterTrackFoam and the field Cs.
Did you solve the problem then? If yes, can you tell me how?

Thank you!

Chiara
Chia is offline   Reply With Quote

Old   September 24, 2014, 08:08
Default
  #7
New Member
 
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 4
amattosc is on a distinguished road
Quote:
Originally Posted by Chia View Post
Hi Amanda,

I have the same problem with bubbleInterTrackFoam and the field Cs.
Did you solve the problem then? If yes, can you tell me how?

Thank you!

Chiara
Hello Chiara,

Try calling this function "interface.surfactantConcentration();" before line 22 in file "createSurfactantConcentrationField.H" as shown in the code below and then recompile the solver.

I hope it helps!

Code:
// Volume surfactant concentration

volScalarField* CPtr = NULL;

if(!interface.cleanInterface() && interface.surfactant().soluble())
{
    Info << "\nReading field C\n" << endl;
    CPtr = new volScalarField
    (
        IOobject
        (
            "C",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    interface.surfactantConcentration();

    if(runTime.timeIndex() == 0)
    {
        const dimensionedScalar& CA =
            interface.surfactant().surfactBulkConc();

        dimensionedScalar CB("CB", CA.dimensions(), 0);

        (*CPtr) = fluidIndicator*(CA - CB) + CB;

        if
        (
            CPtr->boundaryField()[spacePatchID].type()
         == inletOutletFvPatchScalarField::typeName
        )
        {
            inletOutletFvPatchScalarField& spaceC =
                refCast<inletOutletFvPatchScalarField>
                (
                    CPtr->boundaryField()[spacePatchID]
                );

            spaceC.refValue() = CA.value();
        }
        else
        {
            FatalErrorIn(args.executable())
                << "Boundary condition for bulk surfactant concentration at "
                    << "space patch isn't and should be: "
                    << inletOutletFvPatchScalarField::typeName
                    << abort(FatalError);
        }

        CPtr->correctBoundaryConditions();

        CPtr->write();
    }
}
amattosc is offline   Reply With Quote

Old   October 14, 2014, 09:00
Default
  #8
New Member
 
Chiara
Join Date: Oct 2012
Posts: 9
Rep Power: 4
Chia is on a distinguished road
Hi Amanda,

sorry for the delay of my feedback. Your correction worked fine, thank you!

Best,

Chiara
Chia is offline   Reply With Quote

Reply

Tags
bubbleintertrackfoam, surfactant

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
bubbleInterTrackFoam in parallel (fluidIndicator) pbohorquez OpenFOAM Running, Solving & CFD 6 January 18, 2015 22:54
interTrackFoam and bubbleInterTRackFoam problems hfsf OpenFOAM 0 December 26, 2012 03:12
bubbleInterTrackFoam and Mass transport kel85uk OpenFOAM 2 December 24, 2012 08:25
bubbleInterTrackFoam tutorial kel85uk OpenFOAM 16 December 21, 2012 10:47
How much surfactant affect surface tension qunwuhe@hotmail.com Main CFD Forum 0 June 7, 2007 05:01


All times are GMT -4. The time now is 17:23.