|
[Sponsors] |
May 9, 2015, 16:24 |
Internal Ballistic SRM
|
#1 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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 |
|
May 10, 2015, 15:54 |
|
#2 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
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. |
|
May 12, 2015, 15:25 |
|
#3 | ||
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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(); I tried to implement the library dynamicTopoFvMesh, but it does not seem to be a valid type: Quote:
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:
Thank you PicklER |
|||
May 13, 2015, 17:32 |
|
#4 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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 |
|
May 13, 2015, 17:38 |
|
#5 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
You can use OpenFOAM-2.3.x as well. Just do a "git checkout Port-2.3.x" after you clone the repository.
|
|
May 14, 2015, 15:31 |
|
#6 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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" 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 |
|
May 14, 2015, 15:33 |
|
#7 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
You need to download and install Mesquite. The instructions tell you how.
|
|
May 14, 2015, 17:15 |
|
#8 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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! |
|
May 15, 2015, 10:10 |
|
#9 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
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)
|
|
May 16, 2015, 15:12 |
|
#10 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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 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/ Code:
export MESQUITE_LIB_DIR=$MESQUITE_DIR/lib Code:
cd ~/OpenFOAM/topoMesh/topoFvMesh ./Allwmake Code:
cd mesquiteMotionSolver/ wmake wmake libso Just a note, when I open a new terminal and do: Code:
echo $MESQUITE_LIB_DIR => echo $MESQUITE_DIR => Appriciate your patience and help Regards |
|
May 16, 2015, 22:49 |
|
#11 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
The library directory needs to be in your LD_LIBRARY_PATH as well, I think
|
|
May 20, 2015, 16:37 |
|
#12 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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 Thanks for all the help so far Sandeep, I believe the rest will go more smoothly |
|
May 20, 2015, 18:18 |
|
#13 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
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. |
|
May 21, 2015, 04:29 |
|
#14 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
Morning Sandeep
Thank you for the reply. I tried Code:
motionSolverLibs ("libmesquiteMotionSolver.so"); /motionSolverLibs ("libfvMotionSolvers.so"); Code:
motionSolverLibs ("libmesquiteMotionSolver.so" "libfvMotionSolvers.so"); 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 |
|
May 26, 2015, 09:17 |
|
#15 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
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 |
|
Tags |
ballistics, dynamictopofvmesh, srm |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
error 262144 and unexpected disconnect when run on 2 nodes | Emily1412 | SU2 Installation | 1 | April 10, 2014 18:08 |
Create an internal face | aylalisa | OpenFOAM Pre-Processing | 1 | June 19, 2013 13:02 |
[Commercial meshers] Internal boundary problem | stefanke | OpenFOAM Meshing & Mesh Conversion | 2 | May 24, 2011 03:21 |
[Commercial meshers] TGridFluent mesh with internal by prism layer and internal face for diagnostic | sponiar | OpenFOAM Meshing & Mesh Conversion | 2 | March 30, 2009 16:02 |