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

Calculating Interface Area with InterFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2021, 06:59
Default
  #21
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
I am not sure I understand. What do you mean with floder and which part of the code. Above, 2 different code snippets have been posted. The code about the volume of the cell is inserted in the createFields.H file, which back then (code 1.7+ to maybe 2.3 or 2.4), existed and basically made field available at runtime.
__________________
~roman
romant is offline   Reply With Quote

Old   November 22, 2021, 07:19
Default
  #22
New Member
 
hari
Join Date: Nov 2019
Posts: 9
Rep Power: 6
Saicharan is on a distinguished road
Hi Roman,
I mean in which header file should I add the albanova interface code you specified in your paper? Or should I create a separate header file for adding albanova interface? If I should create one such file where should I add that header file after creating it?
Thanks and regards.
Saicharan is offline   Reply With Quote

Old   November 22, 2021, 09:29
Default
  #23
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Hi Saicharan,


Please have a look at the thesis that describes the code. The code is part of the thesis. http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-77980


Best regards,
Roman
__________________
~roman
romant is offline   Reply With Quote

Old   November 23, 2021, 00:12
Default
  #24
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 96
Rep Power: 4
saicharan662000@gmail.com is on a distinguished road
Hi roman,
I went through thesis. The albanova file you mentioned in your was said to be extracted from phaseChangeTwoPhaseMixture. Can I know where albanovaInterface.H file is? And also how did u compile the albanovaInterface.C without .H file?
Please help me
Thanks and regards
saicharan662000@gmail.com is offline   Reply With Quote

Old   November 23, 2021, 04:48
Default
  #25
New Member
 
hari
Join Date: Nov 2019
Posts: 9
Rep Power: 6
Saicharan is on a distinguished road
HI roman,
where should I inser the code you gave in interphasechangefoam?
Foam::tmp<Foam::volScalarField>
Foam:haseChangeTwoPhaseMixtures::AlbaNovaInterfa ce::interfaceArea() const
{
// return the interfacial area based on model for interfacial area
// returns dimensions Area

// model based on regular volume cells, taking the largest cut area
// as maximum for area, linear increase and decrease with alpha
const volScalarField& cellVolume =
alpha1_.db().lookupObject<volScalarField>("cellVol u");
volScalarField limitedAlpha1 = min(max(alpha1_, scalar(0)), scalar(1));

const dimensionedScalar
areaFactor("areaFactor",dimensionSet(0,2,0,0,0,0,0 ), 0.0);

volScalarField interfaceArea = alpha1_ * areaFactor;
volScalarField maxArea = alpha1_ * areaFactor;

maxArea = sqrt(3.0)*pow(cellVolume,(2.0/3.0));
return tmp<volScalarField>
(
(neg(limitedAlpha1-0.5)*maxArea*2.0*limitedAlpha1) +
(pos(limitedAlpha1-0.5)*maxArea*(-2.0*( limitedAlpha1 - 1.0)))
);

}
Thanks and regards.
Also thanks for your replies
Saicharan is offline   Reply With Quote

Old   November 29, 2021, 04:25
Default
  #26
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
Quote:
Originally Posted by Saicharan View Post
HI roman,
where should I inser the code you gave in interphasechangefoam?
Foam::tmp<Foam::volScalarField>
Foam:haseChangeTwoPhaseMixtures::AlbaNovaInterfa ce::interfaceArea() const
{
// return the interfacial area based on model for interfacial area
// returns dimensions Area

// model based on regular volume cells, taking the largest cut area
// as maximum for area, linear increase and decrease with alpha
const volScalarField& cellVolume =
alpha1_.db().lookupObject<volScalarField>("cellVol u");
volScalarField limitedAlpha1 = min(max(alpha1_, scalar(0)), scalar(1));

const dimensionedScalar
areaFactor("areaFactor",dimensionSet(0,2,0,0,0,0,0 ), 0.0);

volScalarField interfaceArea = alpha1_ * areaFactor;
volScalarField maxArea = alpha1_ * areaFactor;

maxArea = sqrt(3.0)*pow(cellVolume,(2.0/3.0));
return tmp<volScalarField>
(
(neg(limitedAlpha1-0.5)*maxArea*2.0*limitedAlpha1) +
(pos(limitedAlpha1-0.5)*maxArea*(-2.0*( limitedAlpha1 - 1.0)))
);

}
Thanks and regards.
Also thanks for your replies



Hi,


Please see the attached zip file. It has been a really long time since I wrote this and it was written for OpenFOAM 1.6.x. I cannot make any promises that it works or is correct. Please use this only as an implementation exercise.


It incluse the make files, options files and all header files for the new solver and the models.



Best regards,
Roman
Attached Files
File Type: zip solvers.zip (35.7 KB, 7 views)
__________________
~roman
romant is offline   Reply With Quote

Old   November 29, 2021, 05:04
Default
  #27
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 96
Rep Power: 4
saicharan662000@gmail.com is on a distinguished road
Tank you roman , I will go through them.
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 1, 2021, 01:10
Default
  #28
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 96
Rep Power: 4
saicharan662000@gmail.com is on a distinguished road
Thank you Roman the zip file helped me.
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 23, 2021, 02:51
Default
  #29
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 96
Rep Power: 4
saicharan662000@gmail.com is on a distinguished road
Hi Roman ,
How can you print the interface areas of all the cells using your code. I used it in my own solver myCompressibleInterFoam and simulated sloshing tank test case but I am not getting any output for interface area and interface area is not getting displayed in fields list. can you help me with this.
Thanks in advance.

Last edited by saicharan662000@gmail.com; December 24, 2021 at 00:38.
saicharan662000@gmail.com 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
[OpenFOAM] How to plot time vs distance traveled by the interface interFoam asaha ParaView 9 January 26, 2011 08:05
InterFoam freeSurface area calculation with sampleSurface jaswi OpenFOAM Post-Processing 9 December 10, 2009 11:07
How to calculate liquid volume as the interface moves for interFoam Solver asaha OpenFOAM Running, Solving & CFD 25 October 21, 2009 04:34
Problems calculating field gh with interFoam cricke OpenFOAM Running, Solving & CFD 0 December 10, 2007 07:17
How to access interface area in vof model??? Asghari FLUENT 0 April 16, 2007 08:12


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