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

Moving boundary problem based on calculated data

Register Blogs Community New Posts Updated Threads Search

Like Tree42Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2016, 12:18
Default dissolFoam
  #41
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
For those interested in solving moving boundary problems I would like to draw your attention to a package developed by my colleague Vitaliy Starchenko. Starting with Frederic Heckman's posting (#3) we have been studying the opening of fractures due to dissolution; a paper is under review at the present time.

dissolFoam is the solver Vitaliy developed for this work and the the latest snapshot is available at https://github.com/vitst/dissol240.

The main features are:

dissolFoam - the solver (including normal surface motion due to dissolution)

dissolMeshRelax - for surface mesh relaxation - this is still under development but it is essential for a simulation of any relevant duration. Right now it is specific to a geometry with parallel inlet and outlet planes for the flow

nonLinear - a boundary condition for nonlinear dissolution kinetics (based on mixed)
danckwerts - a Danckwerts bc (also based on mixed)

coupledPatchInterpolation - this fixes the faceToPoint interpolation across coupled patches, such as cyclic and processor. This has been discussed at several points on this thread
steadyStateControl - a modification of simpleControl so the time counter does not increment every loop (annoying in steady state flows).

patches - There are a couple of patches to the OF source code that should be compiled in. One of them is needed for steadyStateControl the other fixes a bug (in our opinion) in the solver convergence tests. Vectors are normed component by component which can lead to non-convergence if one of the components is zero (or near zero). The patch norms each component by the norm for the whole vector (or tensor).

cases - there are some sample case files, but none of them are that quick to run
docs - there is a longer description of the software in dissol240/docs/SI.pdf

examples - sample movies from dissolFoam simulations
The attached pdf illustrates what the simulations look like. The fracture is a narrow slot running through soluble rock. There are small random displacements in the initial surface positions. The large channels grow from that.

Tony

PS: dissolFoam is based on OpenFOAM-v2.4.0
Attached Files
File Type: pdf random.pdf (150.4 KB, 117 views)
Kummi likes this.

Last edited by tladd; June 23, 2016 at 13:36. Reason: Additional info
tladd is offline   Reply With Quote

Old   August 4, 2017, 08:27
Default
  #42
New Member
 
dario
Join Date: Dec 2016
Posts: 24
Rep Power: 9
dariodario32 is on a distinguished road
I'm trying to do the same in OF 4.1
I got the following error:
error: no match for ‘operator==’ (operand types are ‘const Foam:ointPatchField<Foam::Vector<double> >’ and ‘Foam::vectorField {aka Foam::Field<Foam::Vector<double> >}’)
PointDisplacement.boundaryField()[patchI] == displacements;

it shows up even when I try to compile your example.
I understand that I should change pointVectorField in pointPatchField, but I didn't find a way to make it work. Anyone tried this in later versions of OF?

Thanks
dariodario32 is offline   Reply With Quote

Old   August 4, 2017, 08:42
Default
  #43
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
Hi Dario

That package was tested in OF 2.4.0 so you need to install that version (2.x should work). There was a major rewrite of the OF internals in 3.0. That breaks a lot of the things in the code. OF is developing very rapidly so its a bit of a moving target.

Vitaliy's codes do work with 4.1 but we do not have a bundled release. You can obtain development snapshots of the various pieces at
https://github.com/vitst?tab=repositories
The important repositories are:
dissolFoam - the solver
libsFoamAux - additional libraries
patches-OpenFOAM-v3.xPlus-unofficial - this still works for 4.x
dissolFoamTestCases - The README will tell you the commits for dissolFoam and libsFoamAux that were used to generate the results. The input files might be a bit different for different commits.

Hope this helps. Good luck

Tony
tladd is offline   Reply With Quote

Old   April 5, 2018, 10:15
Default dissolFoam-v1706
  #44
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
My colleague Vitaliy has released a new set of source codes and case files for moving boundary simulations based on OpenFoam-v1706

dissolFoam release

The release contains a solver, additional libraries, utilities and case files.

A packaged release can be found at

https://github.com/vitst/dissolFoam/releases/tag/v1706

Regards

Tony

PS: I added some images from one of the cases (dissolCirc). They shows a soluble cylinder dissolving: Initial mesh (snappyHex), an expanded view of the trailing edge of the cylinder, mesh at time 50 (dt = 0.2), an expanded view of the trailing edge of the cylinder at t=50
Attached Images
File Type: jpg S0tot.jpg (148.2 KB, 64 views)
File Type: jpg S0circ.jpg (76.8 KB, 57 views)
File Type: jpg S50tot.jpg (181.7 KB, 70 views)
File Type: jpg S50circ.jpg (149.3 KB, 56 views)

Last edited by tladd; April 5, 2018 at 13:16. Reason: Adding images
tladd is offline   Reply With Quote

Old   June 28, 2018, 03:06
Default Oscillating cylinderField
  #45
Member
 
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 8
Ben UWIHANGANYE is on a distinguished road
Hello Foamers,

I have read this thread and trusted you that you may help.

Indeed, I want to move cylindrical Field created using topoSetDict to follow a certain path (x) in Cartesian grid. I wrote a C++ program that is giving me the value of x at each time step(see attached).

Does it sound possible to code and move that cylindrical Field following that path?

If yes how?
where should I start from?
which tutorial would help?
How to make that c++ working in OpenFoam?


Thank you!
Attached Images
File Type: png cyli ib.png (1.1 KB, 20 views)
Attached Files
File Type: docx The general equation for free undamped vibration.docx (14.1 KB, 8 views)
Ben UWIHANGANYE is offline   Reply With Quote

Old   June 28, 2018, 05:31
Default
  #46
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
Quote:
Originally Posted by Ben UWIHANGANYE View Post
Hello Foamers,

I have read this thread and trusted you that you may help.

Indeed, I want to move cylindrical Field created using topoSetDict to follow a certain path (x) in Cartesian grid. I wrote a C++ program that is giving me the value of x at each time step(see attached).

Does it sound possible to code and move that cylindrical Field following that path?

If yes how?
where should I start from?
which tutorial would help?
How to make that c++ working in OpenFoam?


Thank you!

Ben


DissolFoam was designed to move a boundary patch in the direction of the local surface normal. If you want to move a field this is not what you want.


It is not clear to me what equations you are trying to solve, but what dissolFoam does is described in the attached document.


Tony



Tony
Attached Files
File Type: pdf doc.pdf (115.3 KB, 36 views)
tladd is offline   Reply With Quote

Old   October 9, 2018, 07:08
Default
  #47
Member
 
Massachusetts
Join Date: Jun 2015
Posts: 46
Rep Power: 10
kayla1994 is on a distinguished road
Hello everybody,
What boundary condition should I set in the pointDisplacement file if I have a complex surface and I cannot define only one normal vector for every points?
kayla1994 is offline   Reply With Quote

Old   October 9, 2018, 09:05
Default
  #48
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
Can you give some details. Are you trying to implement a moving boundary condition?



If you are using dissolFoam-v1706 then the PMU file should point to the normalSurfaceMotion boundary condition. There are case files in the release (#44) that will show you how to do that.


Tony
Kummi likes this.
tladd is offline   Reply With Quote

Old   October 9, 2018, 11:19
Default
  #49
Member
 
Massachusetts
Join Date: Jun 2015
Posts: 46
Rep Power: 10
kayla1994 is on a distinguished road
Quote:
Originally Posted by tladd View Post
Can you give some details. Are you trying to implement a moving boundary condition?

If you are using dissolFoam-v1706 then the PMU file should point to the normalSurfaceMotion boundary condition. There are case files in the release (#44) that will show you how to do that.

Tony
Hi Tony, thanks for your reply. I'm working with a variation of moveDynamicMesh.
What I would like to do it's deforming the surface geometry applying a displacement field at the nodes proportional to some scalar field.
If you need further details, I opened a thread here.

moveDynamicMesh BCs

Thank you for help,
best regards
kayla1994 is offline   Reply With Quote

Old   April 3, 2020, 00:18
Default
  #50
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by ngj View Post
Dear all,
[*]In 2D simulations, the width of the computational domain in the empty direction has an effect on the mass conservation error. This is solely related to the fact that the weights are from the faces to the points. For instance, on non-equidistant grids and very wide meshes in the empty direction, the interpolation becomes a simple average (identical weights for all points). This is obviously not correct, since the mesh is defined as non-equidistant.[/LIST]An alternative interpolation method is proposed in the same paper.

I hope that these finding are valuable for some of you.


Kind regards,


Niels

Interesting findings! I wonder if the latest version of OF still has the same problem regarding empty boundary.
Michael@UW is offline   Reply With Quote

Old   September 4, 2020, 14:05
Default
  #51
New Member
 
Armin Alavi
Join Date: May 2019
Location: Tehran
Posts: 22
Rep Power: 6
ArminAlavi is on a distinguished road
Hello Frederic
I am struggling with a problem you answered in post #3. I use your exact code but I get the following error message:
Quote:
In file included from /opt/openfoam6/src/OpenFOAM/lnInclude/token.H:46:0,
from /opt/openfoam6/src/OpenFOAM/lnInclude/UListIO.C:28,
from /opt/openfoam6/src/OpenFOAM/lnInclude/UList.C:233,
from /opt/openfoam6/src/OpenFOAM/lnInclude/UList.H:484,
from /opt/openfoam6/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam6/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam6/src/OpenFOAM/lnInclude/UPstream.H:42,
from /opt/openfoam6/src/OpenFOAM/lnInclude/Pstream.H:42,
from /opt/openfoam6/src/OpenFOAM/lnInclude/parRun.H:35,
from /opt/openfoam6/src/finiteVolume/lnInclude/fvCFD.H:4,
from pyrolysisFoam.C:32:
/opt/openfoam6/src/OpenFOAM/lnInclude/typeInfo.H: In instantiation of ‘To& Foam::refCast(From&) [with To = Foam::Field<Foam::Vector<double> >; From = const Foam:ointPatchField<Foam::Vector<double> >]’:
moveMesh2.H:33:96: required from here
/opt/openfoam6/src/OpenFOAM/lnInclude/typeInfo.H:110:16: error: cannot dynamic_cast ‘r’ (of type ‘const class Foam:ointPatchField<Foam::Vector<double> >’) to type ‘class Foam::Field<Foam::Vector<double> >&’ (conversion casts away constness)
return dynamic_cast<To&>(r);
^~~~~~~~~~~~~~~~~~~~
/opt/openfoam6/src/OpenFOAM/lnInclude/typeInfo.H:119:16: error: cannot dynamic_cast ‘r’ (of type ‘const class Foam:ointPatchField<Foam::Vector<double> >’) to type ‘class Foam::Field<Foam::Vector<double> >&’ (conversion casts away constness)
return dynamic_cast<To&>(r);
^~~~~~~~~~~~~~~~~~~~
/opt/openfoam6/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/pyrolysisFoam.o' failed
make: *** [Make/linux64GccDPInt32Opt/pyrolysisFoam.o] Error 1
my OF version is 6, i think it has something to do with the version. could you please guide me how to solve this problem?
Thank you
Armin
ArminAlavi is offline   Reply With Quote

Old   October 17, 2023, 09:01
Default
  #52
New Member
 
Shannon Leakey
Join Date: Mar 2019
Posts: 10
Rep Power: 7
scleakey is on a distinguished road
Quote:
Originally Posted by ArminAlavi View Post
Hello Frederic
I am struggling with a problem you answered in post #3. I use your exact code but I get the following error message:

my OF version is 6, i think it has something to do with the version. could you please guide me how to solve this problem?
Thank you
Armin
This happened to me too - I think you now have to write boundaryFieldRef instead of boundaryField for the line
Code:
vectorField &pDisp=refCast<vectorField>(PointDisplacement.boundaryField()[patchWallID]);
scleakey is offline   Reply With Quote

Old   October 28, 2023, 13:10
Default
  #53
Member
 
Tony Ladd
Join Date: Aug 2013
Posts: 48
Rep Power: 12
tladd is on a distinguished road
Armin


Vitaliy released a version of dissolFoam for OF 6. I did not see your message until now. Hope you found a solution.


Tony
tladd 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
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 01:54
Framework for moving mesh based on 2D-computation as a boundary condition Arnoldinho OpenFOAM Running, Solving & CFD 0 May 17, 2011 12:48
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


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