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

the inlet proile is not numbers while using funkySetFieldsDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2021, 07:27
Exclamation the inlet proile is not numbers while using funkySetFieldsDict
  #1
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Hi guys,

I am using funkySetFields to set inlet profiles and initial fields. The following two scripts are regarding the 0_org/Ua and funkySetFieldsDict files, respectively.
Code:
  fields
        (
        z Ua
        );
        lookuptables (
        {
        name inletprofilesedvel;
        outOfBounds clamp;
        file "$FOAM_CASE/1d_profil/Ua0.xy";
        }
        {
        name inletprofilesedvelv;
        outOfBounds clamp;
        file "$FOAM_CASE/1d_profil/Ua2.xy";

Code:
    inlet
    {
        type            groovyBC;
        refValue        uniform   (0 0 0);
        valueExpression "vector(inletprofileua(pos().z),0,inletprofilewa(pos().z))";
        gradientExpression "vector(0,0,0)";
        fractionExpression "1";
        evaluateDuringConstruction 1;
        variables       "";
        timelines       (
);
        lookuptables    (
{
        name            inletprofilewa;
        file        "$FOAM_CASE/1d_profil/Ua1.xy";
        outOfBounds     clamp;
Ua.xy is
Code:
(
(-0.09976763165984251 2.254282019e-06)
(-0.09930371004903199 6.748271668e-06)
(-0.0988414157182435 1.1219279619e-05)
(-0.0983807429595295 1.5667359493e-05)
(-0.0979216860849635 2.0092638377e-05)
(-0.09746423942657101 2.449525303e-05)
(-0.0970083973362585 2.8875340809e-05)
(-0.0965541541857445 3.3233038369e-05)
(-0.09610150436648901 3.7568481483e-05)
(-0.0956504422896245 4.1881805009e-05)
(-0.0952009623858885 4.6173142888e-05)
(-0.09475305910555301 5.0442628141e-05)
(-0.09430672691835701 5.4690392869e-05)
(-0.09386196031343699 5.8916568252e-05)
(-0.09341875379926 6.3121284546e-05)
(-0.092977101903556 6.7304671088e-05)
(-0.0925369991732495 7.1466856289e-05)
(-0.0920984401743925 7.5607967639e-05)
(-0.091661419492097 7.9728131703e-05)
(-0.0912259317304695 8.3827474123e-05)
(-0.09079197151254301 8.7906119615e-05)
(-0.090359533480211 9.1964191975e-05)
(-0.08992861229416149 9.600181407e-05)
(-0.089499202633811 0.000100019107847)
(-0.089071299197239 0.000104016194326)
after I executed ./Allrun, the following warning occurred.

Code:
 Modifying field Ua of type volVectorField

 Putting "vector(inletprofilesedvel(pos().z),inletprofilesedvelv(pos().z),inletprofilesedvelw(pos().z))" into field Ua at t = "0" if condition "true" is true
 Keeping patches unaltered

swak4Foam: Allocating new repository for sampledMeshes
--> FOAM Warning :
    From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(const fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict)
    in file groovyBCFvPatchField.C at line 136
    No value defined for Ua on inlet therefore using the internal field next to the patch
 Setting 5487152 of 5487152 cells
 Writing to "Ua"
and I checked 0/Ua, which is shown as follows.

Code:
FoamFile
{
    version     2.0;
    format      binary;
    class       volVectorField;
    arch        "LSB;label=32;scalar=64";
    location    "0";
    object      Ua;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];


internalField   nonuniform List<vector>
5487152
(�/P�4l�?^@^@^@^@^@^@^@^@1^C�bk�e��/P�4l�?^@^@^@^@^@^@^@^@1^C�bk�e��/P�4l�?^@^@^@^@^@^@^@^@1^C�bk�e��/P�4l�?$
~�^M:�����Lyہˁ?^@^@^@^@^@^@^@^@^E~�^M:����сLyہˁ?^@^@^@^@^@^@^@^@^E~�^M:����сLyہˁ?^@^@^@^@^@^@^@^@^H~�^M:����$
~�^M:�����Lyہˁ?^@^@^@^@^@^@^@^@
~�^M:�����Lyہˁ?^@^@^@^@^@^@^@^@^H~�^M:����сLyہˁ?^@^@^@^@^@^@^@^@
6�Ζ?^@^@^@^@^@^@^@^@*ʖx5�[��c�
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
6��?^@^@^@^@^@^@^@^@*�x5�[��c��
Why the imported inlet values are not numbers? any help will be appreciated.
qi.yang@polimi.it is offline   Reply With Quote

Old   June 9, 2021, 07:35
Default
  #2
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Does anybody have an idea?
qi.yang@polimi.it is offline   Reply With Quote

Old   June 14, 2021, 13:05
Default
  #3
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

This is related to the setting writeFormat in your controlDict.

It looks like you have it as binary, so the computer can read it, but you probably can't. You could change it to ascii to check if the result is expected. However using binary actually saves some accuracy and disk space typically, so for the actual run I would advise to keep this as binary.

If you want to keep the original file readable I suggest to make a copy of your 0 folder as 0.org before running funkySetFields. This will also help in correcting mistakes as you can quickly return to the original file.

Have a look at some of the tutorials, they typically use this approach.

Best Regards,
Tom
tomf is offline   Reply With Quote

Old   June 15, 2021, 09:39
Default
  #4
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Quote:
Originally Posted by tomf View Post
Hi,

This is related to the setting writeFormat in your controlDict.

It looks like you have it as binary, so the computer can read it, but you probably can't. You could change it to ascii to check if the result is expected. However using binary actually saves some accuracy and disk space typically, so for the actual run I would advise to keep this as binary.

If you want to keep the original file readable I suggest to make a copy of your 0 folder as 0.org before running funkySetFields. This will also help in correcting mistakes as you can quickly return to the original file.

Have a look at some of the tutorials, they typically use this approach.

Best Regards,
Tom
Thanks a lot, I finally realized this.
qi.yang@polimi.it is offline   Reply With Quote

Reply

Tags
funkysetfieldsdict, swak4faom


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
setting the correct format of nonuniform List<vector> for inlet in 0 Folder cfdonline2mohsen OpenFOAM Running, Solving & CFD 8 July 18, 2019 09:03
Reversed flow using pressure inlet and outlet? here_for_help FLUENT 0 September 28, 2018 16:20
Adjuting oulet pressure till inlet pressure reaches a certain value in timestep pvpnrao OpenFOAM Running, Solving & CFD 2 September 11, 2018 11:14
velocity inlet and ideal gas simultaneously-what's wrong? preetam69 FLUENT 0 September 28, 2013 05:51
Inlet Velocity in CFX aeroman CFX 12 August 6, 2009 19:42


All times are GMT -4. The time now is 08:01.