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

try to creat Splash in PatchInteractionModel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 10, 2014, 16:46
Post try to creat Splash in PatchInteractionModel
  #1
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 4
brbbhatti is on a distinguished road
I'm implementing Splash module as PatchInteractionModel. I am unable to understand the Correct function in every PatchInteractionModel implementation.Can anyone tell me from where Correct function is called and where I have to add my own functions besides Correct function

src / lagrangian / intermediate / submodels / Kinematic / PatchInteractionModel
brbbhatti is offline   Reply With Quote

Old   June 12, 2014, 08:54
Question Unknown Patch Interaction Model
  #2
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 4
brbbhatti is on a distinguished road
Hello everyone,

I am trying to implement a new model in Patch Interaction Model name Splash. I make a new correct function and make a new .C and .H file for splash. Then i add splash function in PatchInteraction model as they both are interconnected.

Then i add these files in Intermediate folder replacing the old Patch Interaction Model files and also make a new folder for splash Model.

I rename the Make file
Quote:
LIB = $(FOAM_USER_LIBBIN)/liblagrangianIntermediate_new
And then compile it by running

wclean
wmake libso


Then compile a new solver without any error.

But when i run it using the solver it give the following error :


Quote:
Constructing 3-D injection
Selecting distribution model uniform
Selecting patch interaction model splash


--> FOAM FATAL ERROR:
Unknown patch interaction model type splash

Valid patch interaction model types are:
5
(
localInteraction
multiInteraction
none
rebound
standardWallInteraction
)
From function PatchInteractionModel<CloudType>::New(const dictionary&, CloudType&) in file /home/bhb8fe/OpenFOAM/2.1.0/lib/lagrangian_new/intermediateSplash/lnInclude/PatchInteractionModelNew.C at line 54.
Can anyone tell me what can i do , where i have to add this splash Model so that the solver can call it.
brbbhatti is offline   Reply With Quote

Old   June 16, 2014, 09:13
Default
  #3
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
I wouldn't recompile the whole Lagrangian intermediate library only for a new sub-model.

I attached a small example that shows you how to implement your own patch interaction model in a user defined library.

Linking that library to a solver at compile or run-time is explained here (scroll down to the bottom of the page):
http://www.openfoam.org/docs/user/co...plications.php
Attached Files
File Type: gz MyPatchInteractionModel.tar.gz (4.1 KB, 23 views)
dkxls is offline   Reply With Quote

Old   June 16, 2014, 09:38
Default
  #4
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 4
brbbhatti is on a distinguished road
Hi Armin,

Thanks , i already read that link and i had a problem in calling the model when i try to run it. I compile the library and solver and that was ok but it was not recognizing the new model but now i got it that i have to mention it also in BasicKinematicParcelsubmodle.
but now i have some other problem because now it is not compiling the library.

I just have one question in

" How can i make changes in that or make new cloud type instead of correct

Quote:
template<class CloudType>bool Foam::PatchInteractionModel<CloudType>::correct
(
typename CloudType:arcelType&,
const polyPatch&,
bool&,
const scalar,
const tetIndices&
)
I tried to do some changes but it always says it is not the right <cloudtype>.

Can you just give me some hint or idea how can i make changes in that.

Regards,

Bilal
brbbhatti is offline   Reply With Quote

Old   July 1, 2014, 05:21
Default
  #5
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,552
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bilal,

a very good and smooth way is
  • copy a existing and working model
  • rename the copied folder and files
  • rename the class and member names (as you wish)
  • change the necessary functions (like in ::correct)
__________________
Best regards,
Tobias Holzmann

Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de
OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com
A list of some active OpenFOAM contributers can be found »here«
A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de
Tobi is offline   Reply With Quote

Old   July 1, 2014, 06:58
Default
  #6
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 4
brbbhatti is on a distinguished road
Hi Tobi,

Thanks for your time and reply.

I done that what you have written here. but porblem is that when i change the necessary functions like in :: correct i add some more functions which i needed it will not take them and give error like "not declared in scope, or Not a type".

So i make a new void-class-splash and its working now but when i want to use some equations from previous model then its says "shadow a vector" can you tell me how can i overcome this problem as my C++ is not strong.

Thanks.

Best regards,
Bilal
brbbhatti is offline   Reply With Quote

Old   July 1, 2014, 07:00
Default
  #7
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,552
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
In that case I can not give you any hint - sorry.
__________________
Best regards,
Tobias Holzmann

Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de
OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com
A list of some active OpenFOAM contributers can be found »here«
A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de
Tobi is offline   Reply With Quote

Reply

Tags
patchinteraction model, splash

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] How to creat surface from this geometry with icemcfd ztdep ANSYS Meshing & Geometry 2 April 26, 2013 11:01
[ANSYS Meshing] How to creat translational periodic mesh in three direcitons ChenZhan ANSYS Meshing & Geometry 5 January 23, 2013 07:51
how to creat a cone plane with ANSYS 14 CFD-Post L_W CFX 5 July 5, 2012 23:38
creat a pattern in DesignModler Jan CFX 2 June 11, 2005 23:38
Splash of Water Daniel Zetterberg Main CFD Forum 2 July 10, 2000 12:55


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