Syntax of initial conditions in input files

105 views
Skip to first unread message

Anil Kunwar

unread,
Sep 19, 2018, 8:31:10 PM9/19/18
to moose-users
Hi All,
I have created and compiled newt app (https://github.com/anilkunwar/newt) with
ALL_MODULES :=yes.

Now, when I run an input file with 
[ICs]
 
[./c1_IC]
    type
= SpecifiedSmoothCircleIC
    x_positions
=  '0 50' #'25.0e3 45.0e3 75.0e3'
    y_positions
=   '20 20' #'65.0e3 75.0e3 68.0e3'
    z_positions
= '0.0 0.0'     #'0.0 0.0 0.0'
    radii
= '20 20'  #'5.0e3 15.0e3 8.0e3'
    invalue
= 1.0
    outvalue
= 0.0
    int_width
= '5' #'1.0e3 10.0e3 10.0e3'
    variable
= c
 
[../]



the following error occurs.

*** ERROR ***
A
'SpecifiedSmoothCircleIC' is not a registered object.


If you are trying to find this object in a dynamically linked library, make sure that
the library can be found either
in your "Problem/library_path" parameter or in the
MOOSE_LIBRARY_PATH environment variable
.


Is there any change in syntax with respect to initial conditions associated with individual modules or with respect to registration in newtApp.C ?
It used to run with my older app danphe (https://github.com/anilkunwar/danphe) created 4 years ago.


Yours Sincerely,
Anil Kunwar

Anil Kunwar

unread,
Sep 20, 2018, 12:16:45 PM9/20/18
to moose-users
Hi All,
I found that this all happened due to inconsistency in the registration of Moose objects in recently created ''newt'" app.
Previously, I used to register MyMooseObject with danpheApp.C (./danphe/src/base/danpheApp.C) of "danphe " application created 4 years ago.
Now, with the syntax change in registration, I have to register each moose objects in their corresponding .C files (e.g. MyMooseObject in MyMooseObject.C) of newt Application.
registerMooseObject("ExampleApp", ExampleConvection);

Applying these changes and updates in the registry of Moose objects in newt, the abovementioned problem is solved.

Yours Sincerely,
Anil Kunwar

Anil Kunwar

unread,
Sep 20, 2018, 12:32:14 PM9/20/18
to moose-users
Hi All,
Structure of danpheApp.C created 4 years ago.
...

void
DanpheApp::registerObjects(Factory & factory)
{
   
//Kernel
    registerKernel
(CHConvection);
   registerKernel
(SurfaceTension);
 
...  
}
...

There is no  Registry::registerObjectsTo(factory, {"danpheApp"}); and so individual Moose Objects have to be  registered directly within danpheApp.C.  

Structure of newtApp.C created recently.
...

void
newtApp
::registerObjects(Factory & factory)
{
   
Registry::registerObjectsTo(factory, {"newtApp"});
   
//Kernels below should be registered to registerMooseObject in the respective .C files
 
//registerKernel(CHConvection);
 
//registerKernel(SurfaceTension);
}
...


The MooseObjects or kernels , CHConvection and SurfaceTension , should be registered to newtApp via , registerMooseObject("newtApp",  CHConvection); and registerMooseObject("newtApp",  SurfaceTension); respectively in /src/kernel/CHConvection.C and /src/kernel/SurfaceTension.C respectively.  Registry::registerObjectsTo(factory, {"newtApp"}); has enabled the subsequent registration in newtApp.


Yours Sincerely,
Anil Kunwar
Reply all
Reply to author
Forward
0 new messages