|
[Sponsors] |
How to use result of one simulation as a Boundary Condition in another simulation? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 7, 2016, 04:12 |
How to use result of one simulation as a Boundary Condition in another simulation?
|
#1 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
i want to simulation 3D Backward facing step for which i need fully developed profile in 3D channel, i have simulated 3D channel flow but how can i use velocity profile on outlet surface as a inlet condition for velocity in Backward facing step simulation.
i am using OF4, pisoFoam. Thank you |
|
December 10, 2016, 04:44 |
|
#2 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Hi there,
You can use the sample utility to extract the necessary patch fields or simply copy the 'value' entry of each field from the outlet patch boundaryField sub-dictionary. Then, use a 'fixedValue' boundary condition with the value being whatever you extracted or copied. Note that you need to have the correct identifier preceding the value: Code:
inlet { type fixedValue; value nonuniform List<scalar> 100 ( value1 value2 ... value100 ); } Code:
inlet { type fixedValue; value #include "dataFile"; } Code:
nonuniform List<scalar> 100 ( value1 value2 ... value100 ); |
|
December 10, 2016, 06:19 |
|
#3 | |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
Quote:
Thank you usv001 for your valuable suggestion. |
||
December 11, 2016, 10:59 |
|
#4 | |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
Quote:
i tried both the method with dataFile and without dataFile (direct) but inboth cases i got the same Error --> FOAM FATAL IO ERROR: Expected a ')' or a '}' while reading List, found on line 12003 the punctuation token '(' file: /home/srv/OpenFOAM/srv-4.1/run/test/Re400inletchennelprofile/0/dataFile at line 12003. From function char Foam::Istream::readEndList(const char*) in file db/IOstreams/IOstreams/Istream.C at line 155. FOAM exiting dataFile is nonuniform List<vector> 11999 ( (0.904204 0.0278718 0) (0.315227 0.000666436 0) . . . (0.242041 -7.46415e-08 0) (0.242014 -7.92015e-08 0) (0.241989 -7.74893e-08 0) (0.241962 -7.8455e-08 0) (0.241932 -8.07493e-08 0) (0.241902 -8.49888e-08 0) (0.241872 -8.51805e-08 0) (0.241843 -7.30263e-08 0) (0.241818 -7.71504e-08 0) (0.241776 -8.3912e-08 0) (0.241802 1.30619e-07 0) (0.241692 -6.58878e-07 0) ) ; and U file is /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value #include "dataFile"; } outlet { type zeroGradient; } upperWall { type fixedValue; value uniform (0 0 0); } lowerWall { type fixedValue; value uniform (0 0 0); } frontAndBack { type empty; } } // ************************************************** *********************** // please help me. Thank you |
||
December 11, 2016, 11:08 |
|
#5 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Hi Saurav,
Most likely, you are using the wrong number of entries. I think you have 12000 entries; not 11999. So, when reaching the last entry (11999th entry), OF expects a ')' signifying the end of the list but you have one more entry (12000th entry) which starts with a '('. Hence, you get the error. If that doesn't work either, upload the files. USV |
|
December 11, 2016, 12:22 |
|
#6 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
Hi USV
first i tried with 12000 then i got some error then i changed it to 11999. if you do not mind, could you please give me you email id i will send you case file please check it. i will be very thankful to you. Saurav |
|
December 11, 2016, 12:25 |
|
#7 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Hi Saurav,
Exactly what error do you get when you tried 12000? By the way, you can directly upload the '0' file and 'dataFile' using the 'Manage Attachment' button below when you reply. USV |
|
December 11, 2016, 12:31 |
|
#8 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
here is files
|
|
December 11, 2016, 12:34 |
|
#9 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
I am sorry i uploaded the wrong files
here it is |
|
December 11, 2016, 12:37 |
|
#10 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
The attachment does not contain the 'constant/polyMesh' folder. Please include it with the 'blockMeshDict' as well.
USV |
|
December 11, 2016, 12:40 |
|
#11 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
||
December 11, 2016, 12:50 |
|
#12 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Your inlet patch has 20 faces. So, the dataFile should contain a list containing 20 entries as well. The dataFile in the first attachment had 100 entries and the second attachment did not contain any dataFile.
USV |
|
December 11, 2016, 12:54 |
|
#13 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
i have just started using openFoam, i cant able to understand what does it mean and what should i do?
please give me your suggestion to solve this problem Saurav |
|
December 11, 2016, 13:09 |
|
#14 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
HI USV
i got your point i have modified channel geometry and now both simulation have same number of patch but still i am getting same error. saurav |
|
December 11, 2016, 13:11 |
|
#15 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
You inlet boundary patch has 20 faces. So, you need to specify in the dataFile a list that has the same number of entries:
Code:
nonuniform List<vector> 20 ( vector1 vector2 ... vector20 ) USV |
|
December 11, 2016, 13:28 |
|
#16 |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
USV
thank you so much, now it is working fine. Sauarv |
|
December 14, 2016, 06:38 |
|
#17 |
New Member
Join Date: Oct 2016
Posts: 22
Rep Power: 10 |
Hello,
I have a question regarding your topic. Isn't the mapFields command doing just the same thing without copying files?! regards! |
|
January 7, 2017, 10:34 |
|
#18 | |
Member
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 10 |
Quote:
first of all i want to say sorry for late reply, could you please tell me how can we use mapFields to use one simulation result as a boundary condition for another simulation? i dont know anything about mapFields so please describe in detail. Thank you |
||
January 11, 2017, 07:12 |
|
#19 |
New Member
Join Date: Oct 2016
Posts: 22
Rep Power: 10 |
Hey,
after rereading this post, I am not sure if mapFields is the right command for your task. I use mapFields to initialize a simulation with results from a different one. Most of the time it is the same Mesh and Domain and I change the solver or turbulence model. However I think it is maybe possible to just map a patch on another patch and then you'll have the new boundary conditions? You can find the mapFields command in the Standard Utilities and here: http://cfd.direct/openfoam/user-guide/mapfields/ hope this helps! regards! |
|
May 20, 2020, 20:58 |
|
#20 | |
Senior Member
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Change a boundary condition based on simulation result and recompute the simulation | Robin.Kamenicky | CFX | 1 | March 7, 2017 19:35 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
turbineSiting tutorial: slip condition at top boundary gives unexpected result | letzel | OpenFOAM | 0 | June 6, 2014 06:25 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |