Moving Heat Source on a CV
I'm completely new in using OpenFoam and faced with a (I hope simple) problem I don't know how to continue.
My case is to simulate a simple heat conduction welding process where I want to simulate in a first step a moving heat source (Point source or circle) on the surface of a control volume (CV). I've chosen the laplacianFOAM solver because I don't want to consider any convective parts.
For that issue. I've implemented a source term q in the standard laplacianFOAM solver and boundaries.
But how is the approach for using this term as a moving source?
Do I need a moving "meshgrid" on the CV or maybe inside (Volume source) or can I solve this by boundary conditions?
Thanks a lot for answers.
Update: Maybe fvOptions as a solution?
after one more day of searching on a lot of sites I found an approach for my problem using the fvOptions framework.
I'll try it with the simpleScalarFOAM because the solver includes a fvOptions (T) - source-term.
Anyway - does anybody have a good conclusion or an idea where I can find a "manual" how I've to set der fvOptions dictionary file to create a moving heat source?
Thanks again for any reply.
It's easy to model the moving heat source. If your heat source is a surface heat source, then you can impose it as a boundary condition, then groovyBC [http://openfoamwiki.net/index.php/Contrib_groovyBC] will be more helpful for you. Just look at the groovyBC sites.
In case of volumetric heat source, you can easily use "expressionSource"- which comes with the swak4Foam [http://openfoamwiki.net/index.php/Contrib/swak4Foam].
So, what you need to construct the expression for moving source, then use the method that comply your need.
How to implement something from swak4Foam?
thanks a lot for you suggestion!
I'm completely new in OpenFoam and I have after a couple of days reading no idea how I have to implement this function :( I'm sorry, but the structure of OF is not easy to understand...
In the first step, I've downloaded and compiled swak4foam (with ./Allwmake). But where and how do I have to implement the Code? I want to use your suggested expressionSource.H for adding a moving volumetric heat source.
- Is the source itself (size, moving parameters) described in a library in the run/case-folder?
- Do I have to change something in the laplacianFoam.C?
- Should I add something in the ./Make/files oder options-file?
- What is to to in the case-folder?
Thank you for answering my noob-questions ;)
For using expressionSource, there is a example done in swak4Foam-->Examples-->interFoamWithSources. And you can easily take help from this post: http://www.cfd-online.com/Forums/ope...urce-term.html.
How does it work?
thank you again for replying my post. Unfortunately it does not work :(
I'll now exactly describe what I've done from the beginning - maybe you find my mistake:
- I've downloaded the swak4Foam files (Version 0.2.3) from http://openfoamwiki.net/index.php/Contrib/swak4Foam as a *.tar-file and unpacked it in the $HOME/swak4foam directory (and stayed the files later here)
- As mentioned, I commented out the
in the Libraries/swak4FoamParsers/include/swak.H file
- I compiled swak4Foam with ./Allwmake (It took around 10 Minutes!?)
- For my case, I followed the instructions from gschaider in this post: http://www.cfd-online.com/Forums/ope...urce-term.html
- Now these are my files:
Another Problem is that I can't run the suggested Example in ./interFoamWithSources. What do I have to do that it will work?
Thank you again very much - I hope my questions will help other noobs in understanding OpenFoam with swak4Foam :rolleyes:
(Afer success I'll publish my code here).
The error message :(Error Message: expressionSource.H not found)--- so you have problem in the linking file i.e.
EXE_INC = \
(PLEASE CHECK HERE)
EXE_LIBS = \
The same thing is true for the example running.... I'm sure now you can run the solver.
transient heat source
Where u defined the heatSourceDict and how. I am new to OpenFoam and please tell me the step you follow to add the transient heat source into LaplacianFoam.
Transient heat source
I did exactly what you said. But I got this error. Please tell me how to fix this.
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
Build : 2.1.1-221db2718bbb
Exec : mylaplacianFoam
Date : Nov 03 2013
Time : 11:01:29
Host : "kumudu21688-Inspiron-N5040"
PID : 4536
Case : /home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/run/myheatsource
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create mesh for time = 0
Reading field T
Reading diffusivity DT
SIMPLE: no convergence criteria found. Calculations will run for 15 steps.
Calculating temperature distribution
swak4Foam: Allocating new repository for sampledSets
--> FOAM FATAL IO ERROR:
Attempt to return dictionary entry as a primitive
file: /home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/run/myheatsource/system/controlDict::functions::theSensor::setName from line 59 to line 63.
From function ITstream& primitiveEntry::stream() const
in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 82.
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::IOerror::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::dictionaryEntry::stream() const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#3 Foam::SetsRepository::getSet(Foam::dictionary const&, Foam::polyMesh const&) in "/home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/platforms/linux64GccDPOpt/lib/libswak4FoamParsers.so"
#4 Foam::createSampledSet::createSampledSet(Foam::wor d const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) in "/home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#5 Foam::OutputFilterFunctionObject<Foam::createSampl edSet>::allocateFilter() in "/home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#6 Foam::OutputFilterFunctionObject<Foam::createSampl edSet>::start() in "/home/kumudu21688/OpenFOAM/kumudu21688-2.1.1/platforms/linux64GccDPOpt/lib/libswakFunctionObjects.so"
#7 Foam::functionObjectList::read() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#8 Foam::Time::run() const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#9 Foam::Time::loop() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#10 Foam::simpleControl::loop() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
Aborted (core dumped)
|All times are GMT -4. The time now is 04:35.|