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

Adding a user application class

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2006, 15:35
Default Hello, Nice of you to take
  #41
newbee
Guest
 
Posts: n/a
Hello,

Nice of you to take time with this. I have asked for longer time for my thesis work and might have time to figure out how to implement a boundary condition for the heat flux.

answers
-the reason for the discontinuity, what I figure, is that I modified the temperature intervall which should be displayed. Here I choose 306-311 Kelvin.
-All the simulations are done with the same conditions.
-All the simulations are done with the same level of convergence. i.e. same toleranse and relative toleranse


I did the 15x15 simulation again but with more layers in the depth direction. When doing this I got the hotest part of the inner layer of the narrow channel. It might be that I need to expand cells in all directions for it to work.

I'm also thinking of which temperature to set the heating patch to in order to try make the source term the only cause of higher temperature.

here comes a picture of 15x15x60.



regards
/Erik
  Reply With Quote

Old   June 7, 2006, 15:37
Default Im sorry I got tired and forgo
  #42
newbee
Guest
 
Posts: n/a
Im sorry I got tired and forgot to blockMesh command for 15x15x60.

To bad I thought I had something
/Erik
  Reply With Quote

Old   June 8, 2006, 02:53
Default okej, it did the blockMesh com
  #43
newbee
Guest
 
Posts: n/a
okej, it did the blockMesh command and ran a computation of the a 20x20x60 mesh and got the following result.

/image{dutten}

Strangly it seems to have something to do with numbers of mesh layers of the geometry.
  Reply With Quote

Old   June 8, 2006, 02:56
Default sorry, failed to attach pictur
  #44
newbee
Guest
 
Posts: n/a
sorry, failed to attach picture.

Here it is


  Reply With Quote

Old   June 8, 2006, 09:38
Default Is it possible to make the cur
  #45
newbee
Guest
 
Posts: n/a
Is it possible to make the curved patch adiabatic and still use my heat sources in the inner most cell layers? In this way I would not need to worry about finding a patch with a temperature that in total of the channel length does not give or take heat.

regards
/Erik
  Reply With Quote

Old   June 8, 2006, 14:02
Default Everything is possible if it m
  #46
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Everything is possible if it makes sense (physically). I'd say yes. Try it.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 10, 2006, 16:23
Default Thanks again. It worked fine.
  #47
newbee
Guest
 
Posts: n/a
Thanks again. It worked fine.

Im trying to switch and run my case and modified application on the new OpenFOAM version but get an error message when trying to view the results in paraFOAM.

error message:
erik@compadre:~/OpenFOAM/erik-1.3/run/tutorials/simpleFoam$ paraFoam $FOAM_RUN/tutorials/fluxFoam PD112 /*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

fileName::stripInvalid() called for string T(kopia)~
/home/erik/OpenFOAM/OpenFOAM-1.3/bin/paraFoam: line 57: 22496 Aborted paraview paraFoam.pvs
erik@compadre:~/OpenFOAM/erik-1.3/run/tutorials/simpleFoam$

where T(kopia) means T(copy)

The only modification from simpleFoam to add heat calculations is mentioned in the entries above.


This case and application has no problem in v1.2 with corresponding paraFoam version.

Do I have to do anything extra when moving applications from the older version?

Thanks
/Erik
I've seen in bouyentSimpleFoam in v1.3 that there are
  Reply With Quote

Old   June 13, 2006, 05:07
Default Rename your field to be a vali
  #48
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Rename your field to be a valid OpenFOAM 'word'. (that means no brackets)
mattijs is offline   Reply With Quote

Old   June 13, 2006, 05:11
Default thank you it works
  #49
newbee
Guest
 
Posts: n/a
thank you it works
  Reply With Quote

Old   June 15, 2006, 04:57
Default Hi, perhaps this is not reall
  #50
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Hi,
perhaps this is not really the thread to be in, but didn't want to start another one... So:

I've creted a new dictionary file to read some information.
The subdictionary appears like:


[...]
Tab
{
nPoints 5;
points
(
0.2
1.0
2.0
2.5
3.5
);
vectors
(
(1 2 2.1)
(2 3 4)
(2.1 3 4)
(4 5 6)
(7 8 9)
);
[...]


I'm using Field<floatscalar> and Field<vector> more or less like:

dictionary tabDict (region.dict().subDict("Tab"));
nPoints = readInt(tabDict.lookup("nPoints"));
Field<floatscalar> points(nPoints, 1.0);
tabDict.lookup("points") >> points;

And it works fine!

However, I'd like to organize the input in a more convenient way, like this:


[...]
Tab
{
nPoints 5;
entries
(
0.2 (1 2 2.1)
1.0 (2 3 4)
2.0 (2.1 3 4)
2.5 (4 5 6)
3.5 (7 8 9)
);
[...]


because each "point" corresponds with a "vector".

Is there a way to do this?

Francesco
fra76 is offline   Reply With Quote

Old   August 25, 2006, 01:37
Default Hi everybody, Does anyone k
  #51
newbee
Guest
 
Posts: n/a
Hi everybody,

Does anyone know how to add the viscous dissipation heat term to the equation below? This is to be used in a modified version of simpleFoam.

The mathematical formulation of the extra term is:
(-tau:grad(U)) but i dont know how to implement it. Could anyone help me please.

solve
(
fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
- S*q/(rho*Cp)
);
  Reply With Quote

Old   August 25, 2006, 02:47
Default Hi Erik, simpleFoam is an i
  #52
jelmer
Guest
 
Posts: n/a
Hi Erik,

simpleFoam is an incompressible solver, so if you want to implement tau:grad(U) it's better to rewrite it for the incompressible case (using div(U) = 0). You will see the viscous part of the stress tensor simplifies to a Laplacian. The tensor inner product tau:grad(U) eventually simplifies to:

-p*div(U) + mu*magSqr(U)

If you want to implement it in an incompressible flow, it's not that straightforward...

good luck, jelmer

Btw. your question is more suitable for the Running/Solving/CFD thread.
  Reply With Quote

Old   August 25, 2006, 03:14
Default Thanks Jelmar, I am sorry i
  #53
newbee
Guest
 
Posts: n/a
Thanks Jelmar,

I am sorry im in the wrong thread but I have one more question for you if you are game. I have a formula in front of me that suggests that tau:grad(U)=1/2*mu*[sum(i)sum(j)(dv(i)/dx(j)+dv(j)/dx(i)]²

Hope this is readable. is not the power of 2 indication of [grad(U)]² indtead of laplacian(U)?

Thanks again!
  Reply With Quote

Old   August 25, 2006, 03:41
Default That's another way of writing
  #54
jelmer
Guest
 
Posts: n/a
That's another way of writing the same, although I'm not sure about the factor 1/2.

The viscous part of tau:grad(U) yields:

2*mu*D:grad(U)

where D = 1/2 [grad(U) + (grad(U))^T]

Writing this out using the zero velocity divergence (div(U)=0) for incompressible flow gives:

2*mu*D:grad(U) = mu*(grad(U))^T : (grad(U))^T

and the last term gives the stated. You can write it out in the way you did. Check some books on continuum mechanics.

Hope this helps.

Jelmer
  Reply With Quote

Old   September 19, 2006, 03:26
Default Hi everyone I run first exa
  #55
Senior Member
 
Marhamat Zeinali
Join Date: Mar 2009
Location: Tehran, Tehran, iran
Posts: 107
Rep Power: 17
marhamat is on a distinguished road
Hi everyone

I run first example correctly according to readme.
Now i want to use FomaX for pre-processing.
How i install and execute FomaX.
Please help me from first step.

regards
marhamat
marhamat is offline   Reply With Quote

Old   November 24, 2006, 10:58
Default Hej, I have problems with a
  #56
mss
Guest
 
Posts: n/a
Hej,

I have problems with adding a user application class.
When typing "echo $FOAM_USER_CONFIG" I just receive a empty line as answer....?
Could anyone help me with this problem?

thank you,
Rita
  Reply With Quote

Old   February 3, 2010, 00:22
Default Help
  #57
Member
 
mohsen kh
Join Date: Nov 2009
Posts: 41
Rep Power: 15
mohsenkh599 is an unknown quantity at this point
hi everybody
I am an amateur in OpenFOAM. how can I write a new application.
I want to model viscoelastic fluids.
please help soon
mohsenkh599 is offline   Reply With Quote

Old   February 3, 2010, 03:45
Default
  #58
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Hi,

There is a solver in OpenFOAM-1.5-dev called viscoelasticFluidFoam. You could install OpenFOAM-1.5-dev and modify it to fit your own model. Just look through the forum on hints how to install OpenFOAM-1.5-dev. There is some more info on the solver in this thread and this presentation. Hope this helps you on your way.
__________________
Regards, Gijs
gwierink 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
Tmp class maka OpenFOAM Bugs 2 August 20, 2008 14:53
Class Project Tiger Main CFD Forum 5 March 13, 2006 15:58
OpenFoam 12 Adding a user application class vvqf OpenFOAM Pre-Processing 3 October 27, 2005 13:18
Adding new class in version 12 billy OpenFOAM Pre-Processing 1 October 10, 2005 04:47
Expanding a class fabianpk OpenFOAM 0 October 3, 2005 04:26


All times are GMT -4. The time now is 14:54.