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

Internal Ballistic SRM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2015, 15:24
Default Internal Ballistic SRM
  #1
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi

I want to simulate the internal ballistic of a solid rocket motor. At the moment I am using rhoCentralDyMFoam. The flow of air inside the motor is compressible and can/will reach super sonic speeds.

Setup:
Cylinder closed on one end and a relative narrow opening on opposite end. Inside the cylinder there is a grain configuration, either star or cylinder or can be anything. The grain is ignited via a small explosion (not relative for simulation). The grain then burns and the air is compressed and forced out the small opening (nozzle). As the grain burns, the burning area increase and the flux increases from the grain boundary.

I need to only simulate the flow field and the regression burning of the grain. This will be done by calculating the burning distance in the solver for each delta time. As the grain boundary points move in the direction of their normals, the cells expand. When the cells reach a certain (variable) size or the points has moved reached a certain distance, the cells needs to be refined to keep the resolution.

I can move the points in the direction of their normals and I can refine the cells separately, but I can not do this together (attached errorMsg). The error message is when I try to do them separately.

I am looking at the utility dynamicTopoFvMesh, but do not know how to implement it. I believe this will also resolve where points move into a cell (attached).

Can someone please assist me with a testCase/tutorial?

Thank you in advance
Attached Images
File Type: png test02.png (8.0 KB, 62 views)
Attached Files
File Type: txt errorMsg.txt (3.0 KB, 10 views)
PicklER is offline   Reply With Quote

Old   May 10, 2015, 14:54
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
I can't comment on your current setup using dynamicRefineFvMesh, but if you intend to use dynamicTopoFvMesh, you would need a mesh consisting of triangle prism cells (in 2D) in the regions that you would like to re-mesh (boundary layers are fine - they just won't be re-meshed). The refinement criteria can be customized a bit to use cell volume (which cell edge-length is somewhat already analogous to, but I digress).

I would suggest using mesh motion alone first to ensure that you have a boundary motion that satisfies your initial requirements (even if it ultimately leads to skewed cells which require re-meshing), and then incorporate re-meshing as a follow up step. If you can post a case setup with mesh motion well defined, I can briefly guide you through the re-meshing setup.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 12, 2015, 14:25
Default
  #3
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

Thank you for your reply. Please find attached a test case and solver how I would like to move the grain boundary in the direction of their normals. It is a very simplified case. The solver is one I got with help of the forum. It basically determines the points which should move, calculates the distance they will move and then use the commands:

Code:
PointDisplacement.boundaryField()[patchID] == dispVals;
	
mesh.movePoints(motionPtr->newPoints());

mesh.update();
The dynamicMeshDict usess the library dynamicMotionSolverFvMesh and solver displacementLaplacian.

I tried to implement the library dynamicTopoFvMesh, but it does not seem to be a valid type:

Quote:
--> FOAM FATAL ERROR:
Unknown dynamicFvMesh type dynamicTopoFvMesh

Valid dynamicFvMesh types are :

8
(
dynamicInkJetFvMesh
dynamicMotionSolverFvMesh
dynamicRefineFvMesh
movingConeTopoFvMesh
multiSolidBodyMotionFvMesh
rawTopoChangerFvMesh
solidBodyMotionFvMesh
staticFvMesh
)


From function dynamicFvMesh::New(const IOobject&)
in file dynamicFvMesh/dynamicFvMeshNew.C at line 81.
I had a look at the thread: http://www.cfd-online.com/Forums/ope...ofvmesh-3.html, but I do not have the directory that was said to be rebuild via ./wmake libs

I have also looked at OpenFOAM ext 3.1, but had problems to run a test case. I would like to stay with OpenFOAM 2.3.x if possible.

If need be, I will reinstall my OpenFOAM asap in order to be up to date.

Quote:
you would need a mesh consisting of triangle prism cells (in 2D) in the regions that you would like to re-mesh (boundary layers are fine - they just won't be re-meshed)
I am not sure how I would do this... The only way I know is through an STL file and using snappyHexMesh. Otherwise the triangle prism cells can be created in blockMesh (but doubt that is it).

Thank you
PicklER
Attached Files
File Type: gz lBendTest.tar.gz (33.3 KB, 13 views)
File Type: gz myMoveMesh.tar.gz (8.9 KB, 15 views)
PicklER is offline   Reply With Quote

Old   May 13, 2015, 16:32
Default
  #4
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

I must apologise for my ignorance that I did not read the previous thread properly and saw that dynamicTopoFvMesh must first be installed. I saw the install.txt in your repository, but realised that it was aimed at OF ext (please correct me if I am wrong), since the directory FOAM_SRC/dynamicMesh/ does not contain dynamicFvMesh in OF 2.3.x

I will try to use OF ext 3.2 again and give feedback by tomorrow.

Kind regrds
PicklER is offline   Reply With Quote

Old   May 13, 2015, 16:38
Default
  #5
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You can use OpenFOAM-2.3.x as well. Just do a "git checkout Port-2.3.x" after you clone the repository.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 14, 2015, 14:31
Default
  #6
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

I cloned your repository and checked out as Port-2.3.x, thank you for you guidance, say in directory /OpenFOAM/topoMesh

Then I did ./Allwmake in the same directory and, it compiled good except for mesquiteMotionSovler. The error I get looks like

Code:
In file included from mesquiteMotionSolver.H:50:0,
                 from mesquiteMotionSolver.C:27:
mesquiteHeaders.H:43:36: fatal error: Mesquite_all_headers.hpp: No such file or directory
 #include "Mesquite_all_headers.hpp"
When I do cd $FOAM_USER_LIBBIN, I get:
libdynamicTopoFvMesh.so libincompressibleFluxCorrector.so librhoCentralFoam.so
which shows that the library was not created...

I tried a wmake libso in /OpenFOAM/topoMesh/mesquiteMotionSolver but got the same error.

Kind regards
PicklER is offline   Reply With Quote

Old   May 14, 2015, 14:33
Default
  #7
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You need to download and install Mesquite. The instructions tell you how.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 14, 2015, 16:15
Default
  #8
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
I feel really stupid for making the assumption that Mesquite was just another library included in OpenFOAM.

Anyhow, I installed Mesquite 2.3.0 now according to your install.txt. Configured and "make" and "make install".

Now I tried again, but got the following error:

Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicTopoFvMesh
Selecting metric Knupp
Selecting motion solver: mesquiteMotionSolver
--> FOAM Warning : 
    From function dlOpen(const fileName&, const bool)
    in file POSIX.C at line 1179
    dlopen error : /home/erhardt/OpenFOAM/erhardt-2.3.0/platforms/linux64GccDPOpt/lib/libmesquiteMotionSolver.so: undefined symbol: _ZTVN9Mesquite213VertexPatchesE
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&, const bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "libmesquiteMotionSolver.so"
--> FOAM Warning : 
    From function dlLibraryTable::open(const dictionary&, const word&, const TablePtr&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/dlLibraryTableTemplates.C at line 67
    Could not open library "libmesquiteMotionSolver.so"


--> FOAM FATAL ERROR: 
solver table is empty

    From function motionSolver::New(const polyMesh& mesh)
    in file motionSolver/motionSolver/motionSolver.C at line 116.

FOAM exiting
.

libmesquiteMotionSolver.so is present in $FOAM_USER_LIBBIN

Anything else I am missing?

Thanks for your help!
PicklER is offline   Reply With Quote

Old   May 15, 2015, 09:10
Default
  #9
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You might want to ensure that $MESQUITE_DIR / $MESQUITE_LIB_DIR is correctly configured. Sometimes, they might be installed in lib64 instead of lib (or vice versa)
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 16, 2015, 14:12
Default
  #10
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

Thanks you for your suggestion. I checked $MESQUITE_DIR / $MESQUITE_LIB_DIR and they looked correct, but I still get the same error.

Here is what I did after your last post:
Code:
cd ~/OpenFOAM/topoMesh/topoFvMesh
./Allwclean

cd ~/OpenFOAM/topoMesh/mesquite-2.3.0
sudo -s
export MESQUITE_DIR=$WM_THIRD_PARTY_DIR/mesquite-2.3.0

./configure                     \
              --prefix=$MESQUITE_DIR      \
              --enable-release            \
              --disable-debug-assertions  \
              --disable-igeom             \
              --disable-imesh             \
              --disable-irel              \
              --enable-shared             \
              --without-cppunit           \
              --enable-trap-fpe           \
              --disable-function-timers
              
make
make install
I have a 64-bit PC:

Code:
export MESQUITE_LIB_DIR=$MESQUITE_DIR/lib64

echo $MESQUITE_LIB_DIR
=> /opt/ThirdParty-2.3.0/mesquite-2.3.0/lib64

echo $MESQUITE_DIR
=> /opt/ThirdParty-2.3.0/mesquite-2.3.0

cd /opt/ThirdParty-2.3.0/mesquite-2.3.0

ll

=> 
drwxr-xr-x 6 root root  4096 May 14 21:39 ./
drwxr-xr-x 3 root root  4096 May 14 21:39 ../
drwxr-xr-x 2 root root  4096 May 16 19:33 bin/
drwxr-xr-x 2 root root 12288 May 16 19:33 include/
drwxr-xr-x 2 root root  4096 May 16 19:33 lib/
drwxr-xr-x 4 root root  4096 May 14 21:39 share/
Here is no "lib64"... And I have tried:
Code:
export MESQUITE_LIB_DIR=$MESQUITE_DIR/lib
, which results in the same error. But before that (keeping to the instructions):

Code:
cd ~/OpenFOAM/topoMesh/topoFvMesh
./Allwmake
Then I tried the advice here http://www.cfd-online.com/Forums/ope...ofvmesh-3.html post #51
Code:
cd mesquiteMotionSolver/
wmake
wmake libso
which showed that the libraies was up to date. And I tried http://www.cfd-online.com/Forums/ope...e-2-3-0-a.html post #2, but still no luck.

Just a note, when I open a new terminal and do:
Code:
echo $MESQUITE_LIB_DIR
=> 

echo $MESQUITE_DIR
=>
These are then blank. Should I try and remove topoFvMesh and mesquite-2-3-0 and start anew?

Appriciate your patience and help

Regards
PicklER is offline   Reply With Quote

Old   May 16, 2015, 21:49
Default
  #11
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
The library directory needs to be in your LD_LIBRARY_PATH as well, I think
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 20, 2015, 15:37
Default
  #12
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

So I reinstalled my Ubuntu (made my swap partition too small previously) and installed OpenFOAM 2.3.1

I installed Mesquite and cloned your repository and did
checkout Port 2.3.x
./Allwmake
cd mesquiteMotionSolver/
wmake
wmake libso

Now I think that was the trick, but I also copied all the files from
/opt/ThirdParty-2.3.1/mesquite-2.3.0/lib/ to /home/username/OpenFOAM/platforms/linux64GccDPOpt/lib$

I looked at the enviromental variable as you advised and saw that it was pointing to a lot of places except any that contain the libraries in /opt/ThirdParty-2.3.1/mesquite-2.3.0/lib/ but it did point to /home/username/OpenFOAM/platforms/linux64GccDPOpt/lib

Never thought I would be happy to see a printStack error!

I took a look at the circCylinder3d test case from OF-ext, inserted the lines
dynamicFvMeshLibs ("libdynamicTopoFvMesh.so");
motionSolverLibs ("libmesquiteMotionSolver.so");
into the dynamicMeshDict and tried to run a basic solver (attached) Unfortunately I cannot upload the circCylinder3d test case, since the polyMesh folder is too big. The error I get looks as follows:

Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicTopoFvMesh
Selecting metric Knupp
Selecting motion solver: mesquiteMotionSolver
Selecting quality metric: AspectRatioGamma
Selecting objective function: LPtoP
Selecting optimization algorithm: FeasibleNewton
Outer termination criterion (tcOuter) was not found. Using default values.


--> FOAM FATAL IO ERROR: 
Unknown patchField type angularOscillatingDisplacement for patch type wall

Valid patchField types are :

22
(
calculated
codedFixedValue
cyclic
cyclicACMI
cyclicAMI
cyclicSlip
empty
fixedNormalSlip
fixedValue
nonuniformTransformCyclic
processor
processorCyclic
slip
solidBodyMotionDisplacement
subMeshProcessor
symmetry
symmetryPlane
timeVaryingUniformFixedValue
uniformFixedValue
value
wedge
zeroGradient
)


file: /home/erhardt/OpenFOAM/srmDymMesh/myDymMeshCases/circCylinder3d/constant/dynamicMeshDict.mesquiteOptions.fixedValuePatches.topWall from line 92 to line 100.

    From function PointPatchField<Type>::New(const pointPatch&, const Field<Type>&, const dictionary&)
    in file /home/openfoam/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/pointPatchFieldNew.C at line 151.

FOAM exiting
If you do not mind, can you please post a very basic case to move the points. I will use this very basic solver and work with it to see if I can reproduce my results of my test case I posted earlier, the solution of the flow field will be the next step after movement and remesh.

Thanks for all the help so far Sandeep, I believe the rest will go more smoothly
Attached Files
File Type: gz onlyMove.tar.gz (8.4 KB, 6 views)
PicklER is offline   Reply With Quote

Old   May 20, 2015, 17:18
Default
  #13
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You will need to add fvMotionSolvers.so to the list of motionSolverLibs in dynamicMeshDict, because angularOscillatingDisplacement is part of that library.

I intend to post a few basic tutorial cases sometime soon. I'll keep you updated.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   May 21, 2015, 03:29
Default
  #14
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Morning Sandeep

Thank you for the reply. I tried
Code:
motionSolverLibs        ("libmesquiteMotionSolver.so");
/motionSolverLibs        ("libfvMotionSolvers.so");
but this overwrite the Mesquite library then I did:
Code:
motionSolverLibs        ("libmesquiteMotionSolver.so" "libfvMotionSolvers.so");
This worked and I did ./Allrun on the circCylinder3d test case here and got the error in the log file. Looks similar to the one I got from my first test case.

Must I use mesquiteMotionSolver for the point displacement in order to use dynamicTopoFvMesh or can I continue using displacementLaplacian?

If I have to use mesquiteMotionSolver, which PatchField can I use for the points displacement? I could not find a lot on the internet about the different PatchField. Maybe calculated?
Code:
calculated
codedFixedValue
cyclic
cyclicACMI
cyclicAMI
cyclicSlip
empty
fixedNormalSlip
fixedValue
nonuniformTransformCyclic
processor
processorCyclic
slip
solidBodyMotionDisplacement
subMeshProcessor
symmetry
symmetryPlane
timeVaryingUniformFixedValue
uniformFixedValue
value
wedge
zeroGradient
kind regards
PicklER is offline   Reply With Quote

Old   May 26, 2015, 08:17
Default
  #15
Member
 
Join Date: Jul 2014
Posts: 39
Rep Power: 11
PicklER is on a distinguished road
Hi Sandeep

Any news on the tutorial cases for dynamicTopoFvMesh. Eager to start with a working example. At the moment I am still struggling to get circCylinder3d to work and playing around with the parameters in dynamicTopoFvMesh.

Thank you for all the help so far.
Regards
PicklER is offline   Reply With Quote

Reply

Tags
ballistics, dynamictopofvmesh, srm


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
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 22:38
error 262144 and unexpected disconnect when run on 2 nodes Emily1412 SU2 Installation 1 April 10, 2014 17:08
Create an internal face aylalisa OpenFOAM Pre-Processing 1 June 19, 2013 12:02
[Commercial meshers] Internal boundary problem stefanke OpenFOAM Meshing & Mesh Conversion 2 May 24, 2011 02:21
[Commercial meshers] TGridFluent mesh with internal by prism layer and internal face for diagnostic sponiar OpenFOAM Meshing & Mesh Conversion 2 March 30, 2009 15:02


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