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

Tutorial/functional case for solidificationMeltingSource

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

Like Tree34Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2018, 13:49
Default
  #21
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15
gtarang is on a distinguished road
Quote:
Originally Posted by rahul62 View Post
Hi,
I am running the case (solidificationMeltingSource) in of4 but i am not getting alpha1 printed. Can anyone help me with this?

this fvoption uses sms1:alpha1, ie ':', colon in filename. If you are using openfoam in windows, then the file may not be written as windows does not allow ':' in filenames
gtarang is offline   Reply With Quote

Old   April 9, 2019, 11:36
Default
  #22
New Member
 
Anna
Join Date: Feb 2019
Posts: 17
Rep Power: 7
iconde is on a distinguished road
Hi there,

I'm trying to get sms1:alpha1 variable for using it as a condition of a new variable in chtMultiRegionFoam but I'm having problems getting the variable because it doesn't recognize it:

Quote:
./fluid/solveModuloTermicoFluid.H:18:28: error: ‘alpha1_’ was not declared in this scope
newVariable.ref() = alpha1_ * (dimensionedScalar("s", dimensionSet(0,0,1,0,0,0,0), scalar(1.0)));

/opt/openfoam6/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/chtMultiRegionFoamAzterlan.o' failed
Anyone knows how to call this variable?

Thanks!
iconde is offline   Reply With Quote

Old   April 9, 2019, 12:40
Default
  #23
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15
gtarang is on a distinguished road
The variable alpha1_ will not be found directly as you are using. It is there in the memory but not in the .C or .H file in which you are calling.


First you have to search for the variable and then load it. Here you can go ahead in this direction:


Code:
volScalarField liquidFraction = this->mesh_.objectRegistry::lookupObject<volScalarField> ("sMS1:alpha1");

You may have to tweak the above code a bit to match the variable names present in the file.


You may also look at the documentation of chtmultiregionfoam on cpp.openfoam.org.


-gtarang
gtarang is offline   Reply With Quote

Old   April 10, 2019, 05:33
Default
  #24
New Member
 
Anna
Join Date: Feb 2019
Posts: 17
Rep Power: 7
iconde is on a distinguished road
Thank you very much!

I've fixed the problem changing a little bit your function:

Quote:
const volScalarField& liquidFraction = mesh.lookupObject<volScalarField>("sMS1:alpha1");
Thanks!!!!
gtarang likes this.
iconde is offline   Reply With Quote

Old   May 26, 2021, 03:42
Default liquid fraction update
  #25
Member
 
Join Date: Nov 2020
Posts: 53
Rep Power: 6
mikulo is on a distinguished road
Quote:
Originally Posted by gtarang View Post
Hi,
I have been using solidificationMeltingSource as prescribed by you. Other than simple problems the solver fails and typically gives floating point exception error and runs for CFL no 0.1 or less for fine meshes.
I dug into the code and found that energy equation needs to be solved multiple times to actually correct the step function of liquid fraction as can be seen from the algorithm of Voller and Prakash (1987) http://dx.doi.org/10.1016/0017-9310(87)90317-6. I tried doing it by putting nEnergyCorrectors in PIMPLE dictionary and solving the energy equation n times. While I was debugging the code, I found this in solidificationMeltingSource.C line no 145.

Code:
if (curTimeIndex_ == mesh_.time().timeIndex())
    {
        return;
    }
Now according to my understanding, the above code ensures that the liquid fraction is updated only once and found it also. Can anyone suggest what can be the consequences of removing above bit of code.

Thanks
-
Tarang
Hello Tarang,

I have asked that same question too, seems like you are a mile ahead of me in PCM. I have seen your code too, where you remove the snippet above? May I ask, how was your result? Is there any change? It seems like mine is blowing up..

Thanks..

Last edited by mikulo; May 26, 2021 at 07:39.
mikulo is offline   Reply With Quote

Old   June 4, 2021, 02:38
Default
  #26
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15
gtarang is on a distinguished road
I didn't remove that code. That code ensures that liquid fraction is updated only once in a timestep.


-Tarang
gtarang is offline   Reply With Quote

Old   June 4, 2021, 06:55
Default
  #27
Member
 
Join Date: Nov 2020
Posts: 53
Rep Power: 6
mikulo is on a distinguished road
Hello Tarang,

Yes, I understand you. However, if it is updated only once, then the liquid fraction is not corrected, right?Thus, I removed it and make some changes a little bit at the top level.
mikulo is offline   Reply With Quote

Old   November 18, 2023, 15:21
Default
  #28
New Member
 
Akshay Ghorpade
Join Date: Aug 2023
Location: Delhi , India
Posts: 1
Rep Power: 0
Akshay_Ghorpade is on a distinguished road
Hi Anna


In solidificationandMelting Source files (.C and .H) I am unable to understand the placement of this piece of code.



const volScalarField& liquidFraction = mesh.lookupObject<volScalarField>("sMS1:alpha1");

Last edited by Akshay_Ghorpade; November 18, 2023 at 15:25. Reason: Didn't write the complete information
Akshay_Ghorpade is offline   Reply With Quote

Old   April 11, 2024, 08:19
Default chtMultiRegionFoam with solidificationMeltingSource
  #29
New Member
 
Kevin Redosado
Join Date: Jul 2022
Posts: 3
Rep Power: 4
kredosado is on a distinguished road
Hi, I can run the case with bouyantFoam but when I try to use chtMultiRegionFoam the fvOptions "solidificationMeltingSource" does not work. Does anyone know why?
kredosado is offline   Reply With Quote

Old   April 11, 2024, 21:41
Default
  #30
Member
 
Join Date: Nov 2020
Posts: 53
Rep Power: 6
mikulo is on a distinguished road
Quote:
Originally Posted by kredosado View Post
Hi, I can run the case with bouyantFoam but when I try to use chtMultiRegionFoam the fvOptions "solidificationMeltingSource" does not work. Does anyone know why?
It will work, use the fvOptions for fluid region. Can I see your test case?
mikulo is offline   Reply With Quote

Old   May 16, 2024, 10:51
Default
  #31
New Member
 
Kevin Redosado
Join Date: Jul 2022
Posts: 3
Rep Power: 4
kredosado is on a distinguished road
[/QUOTE]
Quote:
Originally Posted by mikulo View Post
It will work, use the fvOptions for fluid region. Can I see your test case?
I've run it with fvOption. I want a sphere that may melt depending on the boundary condition. When I run it with these conditions for a temperature lower than the melting temperature, the sphere has some velocity. Plus the movingFront/alpha1 file I have set up doesn't appear in outside file 0. What could be the problem? For a 1 region case I have no problem running the melting source problem.

I cannot upload my case because it says security token is missing btw. And thanks in advance.
kredosado is offline   Reply With Quote

Old   June 13, 2024, 01:57
Default
  #32
New Member
 
Carlos Alarcon
Join Date: Jun 2021
Posts: 4
Rep Power: 5
calarcon is on a distinguished road
Hi, I attached working melting gallium example running in openfoam11. In case someone needs to not work with a version from 15 years ago.

Launch like this

$ blockMesh
$ decomposePar
$ mpirun -np 8 foamRun -parallel > log &
$ reconstructPar
$ paraFoam
Attached Files
File Type: zip galliumMeltFoamRun.zip (10.6 KB, 17 views)
alexj and Rakesh_Kumar like this.
calarcon is offline   Reply With Quote

Old   September 6, 2024, 17:31
Default SolidificationMelting with Shrinkage void
  #33
New Member
 
JANGA RAKESH KUMAR
Join Date: Aug 2024
Posts: 14
Rep Power: 2
Rakesh_Kumar is on a distinguished road
Quote:
Originally Posted by calarcon View Post
Hi, I attached working melting gallium example running in openfoam11. In case someone needs to not work with a version from 15 years ago.

Launch like this

$ blockMesh
$ decomposePar
$ mpirun -np 8 foamRun -parallel > log &
$ reconstructPar
$ paraFoam



Hello Foamers
I want to capture the shrinkage void at air and solid(liquid) interface during solidification.
Does anybody know how to couple interFoam with this solidification solver????
If anybody has solver for this type of case, please share here

Or else, If anyone knows how to make this solver, please explain.


Currently, I'm struggling to setup my testcase for my thesis for this type of 3 phase.
Any sort of help regarding this problem is greatly appreciated.


Thanks in advance.

-Rakesh
Rakesh_Kumar is offline   Reply With Quote

Old   October 28, 2024, 09:58
Default
  #34
New Member
 
Join Date: Jul 2009
Posts: 6
Rep Power: 17
nando83 is on a distinguished road
Hi foamers,
I tried to run the attached example in openfoam-2312 but I got negative temperature with foam aborting.
I just added
Code:
	pRefCell 0;
	pRefValue 0.0;
to pimple setup in fvSolution.
Any idea of what's wrong here?
Thank you,

Nando

Quote:
Originally Posted by calarcon View Post
Hi, I attached working melting gallium example running in openfoam11. In case someone needs to not work with a version from 15 years ago.

Launch like this

$ blockMesh
$ decomposePar
$ mpirun -np 8 foamRun -parallel > log &
$ reconstructPar
$ paraFoam
nando83 is offline   Reply With Quote

Reply

Tags
melting, phase change

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
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
MRFSimpleFoam wind turbine case diverges ysh1227 OpenFOAM Running, Solving & CFD 2 May 7, 2015 11:13
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Transient case running with a super computer microfin FLUENT 0 March 31, 2009 12:20
Turbulent Flat Plate Validation Case Jonas Larsson Main CFD Forum 0 April 2, 2004 11:25


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